A Saudi security officer and a Yemeni soldier were killed in an attack on a border post between the two countries on Friday, officials said.
The interior ministry in Riyadh said a border security patrol came under fire near the Wadia post in the southern province of Sharura, killing the unit's chief.
Security forces gave chase, killing three of the attackers, while a fourth was wounded and captured, a ministry spokesman said.
The spokesman, quoted by state news agency SPA, said one or two suspects were on the run, without identifying the assailants.
In Yemen, a security source said it was the work of suspected Al-Qaeda gunmen who attacked a military post on the border, triggering a clash that killed one Yemeni soldier and wounded another.
The assailants used machineguns and rocket-propelled grenades to attack the Yemeni side of the Wadia post, the source said, adding that the gunmen managed to flee.
Signup to our newsletter and follow us on Facebook and Twitter!
The crossing is in Yemen's southeastern province of Hadramawt, whose rugged terrain provides hideouts for militants of Al-Qaeda in the Arabian Peninsula.
AQAP, born in 2009 of a fusion of the Saudi and Yemeni branches of Al-Qaeda, is considered by Washington to be the jihadist network's most dangerous affiliate.
Local Yemeni officials told AFP that Friday's attack bore "the thumbprints of Al-Qaeda" without elaborating.
Apart from infiltrators, smugglers do a brisk business across the long and porous border between oil-rich Saudi Arabia and impoverished Yemen.
To counter illegal crossings and arms smuggling, Saudi Arabia is building a three-metre (10-foot) high fence along its southern frontier.
Taking advantage of a collapse of central authority during a 2011 uprising that forced Yemen's veteran strongman Ali Abdullah Saleh from power, Al-Qaeda seized swathes of the country's south and east.
Saudi Arabia launched a massive crackdown on Al-Qaeda following a spate of deadly attacks in the kingdom from 2003-2006.