A Saudi soldier was killed on Saturday by a missile fired by Yemeni rebels across the border into the kingdom's southern Asir province, the interior ministry said.
The Iran-allied Houthis, who are battling the internationally recognised government of Yemen's President Abd Rabbu Mansour al-Hadi, often fire mortars into southern Saudi regions and test Saudi defences with guerrilla-style incursions.
The attack came hours before the Saudi-led coalition that is supporting Hadi in the war, announced a ceasefire in an effort to end a conflict that has displaced millions of people and caused a humanitarian disaster.
The 48-hour truce started at noon (0900 GMT) on Saturday.
The Houthis confirmed the attack in a statement on their Saba news agency. Saudi jets early on Saturday bombed Yemen's capital Sanaa and an area of farmland in Yemen's southern Shabwa province, the statement said.
Saudi Arabia and its Gulf Arab allies intervened in Yemen's war in March 2015 to support Hadi's government. Several dozen Saudi soldiers have been killed in clashes along the long, rugged border with Yemen.