Yemeni President Abdrabuh Mansur Hadi has sacked his interior minister and an intelligence chief after a rise in unrest in the country, official news agency Saba reported on Saturday.
Al-Qaeda-linked militants took advantage of the weakening of the central government during a popular uprising in 2011 to reinforce their strongholds and step up attacks on security forces.
In February, Hadi had criticised the "below-par" performance of Yemen's security services in tackling the growing unrest.
Saba reported on Saturday that Hadi named Abdo Tareb to replace interior minister Abdelqader Qahtan and General Jalal al-Rweshan to take over from Ghalib al-Qamesh as head of the political intelligence department.
He also appointed Khaled Bahhah to replace outgoing Oil Minister Ahmad Dares, the agency said.
Hadi had decided on the changes amid public anger over the mounting unrest in the country, political sources said.
Militants across Yemen launch near-daily attacks on the security forces.
On Saturday morning, five Al-Qaeda militants launched an attack on an army base in the southern town of Loder, killing two soldiers, a military source told AFP.
Signup to our newsletter and follow us on Facebook and Twitter!
One of the attackers, a Saudi national, was killed in the ensuing gunfight, and three others were wounded and captured, the source said.
Al-Qaeda in the Arabian Peninsula, considered by Washington to be the most dangerous franchise of the global jihadist network, has launched large-scale operations in addition to attacks on troops and police.
In February, a raid on the Sanaa central prison allowed 29 prisoners to escape, among them 19 suspected Al-Qaeda militants, and left 11 members of the security forces dead.
Hadi had "pointed out that terrorist acts couldn't have been at this level if it weren't for the below-par performance of the security services" on a visit to the prison shortly after the jailbreak, Saba reported.
Despite the military's operations against militants, Al-Qaeda fighters have kept up their activities in south and southeastern Yemen.
In December, Al-Qaeda gunmen wearing military fatigues launched a brazen daylight assault on the defence ministry in Sanaa that killed 56 people.
Yemen is also grappling with an increasingly violent separatist movement in the south, which was independent between the end of British colonial rule in 1967 and union with the north in 1990.
And in the north of the country, Shiite Huthi rebels have been advancing from their strongholds, regularly clashing with Sunni Islamist fighters and government troops.
Branches of the security apparatus are still controlled by officials loyal to former president Ali Abdullah Saleh who was ousted in 2011 following the uprising against his 33 years in power.