SANAA (Reuters) - Yemen's president abolished two major military units on Wednesday, state television reported, a move that appeared aimed at undermining a political rival and could deepen instability in the impoverished Arab state.

Restoring security in Yemen is a priority for Washington and its Gulf allies because al Qaeda militants are entrenched in parts of the country, posing a potential threat to top oil exporter Saudi Arabia next door and nearby shipping lanes.

State television reported that President Abd-Rabbu Mansour Hadi issued decrees that restructured the armed forces into four major units and abolished the Republican Guard and the First Armoured Division.

"The army was restructured into four units: the land forces, the navy, the air force and the border forces," state television reported.

Brigadier General Ahmed Saleh, the commander of the Republican Guard, this month refused orders to hand over long-range missiles to the Defence Ministry, raising fears of a showdown that could threaten a fragile power structure.

The general, an opponent of Hadi's, is a son of former president Ali Abdullah Saleh, who made way for Hadi in February after a year of protests under a transition plan backed by Gulf Arab countries and the United States.

The former president's legacy still looms large in Yemen. Hadi, elected in February for a two-year interim period with a mandate to restructure the military, has been trying to prise powerful relatives of Saleh out of key positions in the forces.

The reform is a pivotal part of a U.S.-backed power transfer deal, signed in Saudi Arabia, that aims to hold the country together in the face of internal divisions and separatist movements as well as the challenge from Al Qaeda in the Arabian Peninsula.

The Republican Guards, the best equipped wing of the Yemeni armed forces, have been seen as crucial to containing al Qaeda.

(Reporting by Mohammed Ghobari; Writing by Mahmoud Habboush, Editing by William Maclean and Kevin Liffey)