Yemeni Prime Minister Mohamed Basindawa escaped unharmed as gunmen opened fire on his convoy in the capital on Saturday, a security source said.
"Four unknown gunmen opened fire on the prime minister's convoy in central Sanaa as he was heading home," the source told AFP, adding that no one was hurt in the attack.
Basindawa has headed a national unity government since December 2011, under a transition agreement paving the way for president Ali Abdullah Saleh's ouster.
The impoverished Arabian Peninsula state has been rocked by deadly violence since Saleh's departure, particularly in the south and east of Yemen where Al-Qaeda is active.
Basindawa was travelling in an armoured car when the gunmen in a four-wheel drive opened fire before fleeing, the security source said.
It was the first such attack to target the premier, who was a leading opposition figure under Saleh, and several members of his government have also escaped assassination bids.
Apart from the Al-Qaeda threat, Yemen is also caught in a power struggle with southern separatists and faces a rebellion in the mostly-Shiite populated north.
The government on August 21 apologised to both southern separatists and northern rebels for wars against them, as part of efforts to encourage national dialogue aimed at drafting a new constitution and holding elections.
Yemen is the ancestral home of Al-Qaeda's late founder Osama bin Laden and the home base of the militant faction's local front group, Al-Qaeda in the Arabian Peninsula.
AQAP militants took advantage of a decline in central government control during a 2011 popular uprising that forced Saleh from power, and seized large swathes of territory across the south.
But the army expelled them from these areas in June 2012 and they have been increasingly weakened mainly due to US drone attacks, although they still carry out hit-and-run attacks on security forces.