RABAT, Dec 28 (Reuters) - Qatar and Morocco have signed an aid deal worth $1.25 billion, part of a five-year package of financial assistance extended by wealthy Gulf states to the North African kingdom to help it weather 'Arab Spring' protests.

Four Gulf states - Qatar, Saudi Arabia, Kuwait and the United Arab Emirates - agreed in 2012 to provide aid worth a total $5 billion to Morocco in the period 2012-2017 to build up its infrastructure, strengthen its economy and foster tourism.

Each of the four countries has committed $1.25 billion to Morocco for the whole five year period.

The aid is very welcome to King Mohamed - who signed the accord late on Friday with the visiting emir of Qatar - as he seeks to quell the kind of social discontent that helped to oust rulers elsewhere in North Africa, including Tunisia and Egypt.

Morocco is under heavy pressure from international lenders to reduce its budget deficit after spending heavily on food and energy subsidies and higher public sector salaries in 2011 and 2012 to help defuse social tensions.

Morocco has budgeted to receive a total $1 billion in aid from the Gulf states for 2014. It hopes to cut its budget deficit to 4.9 percent of gross domestic product next year from an estimated 5.5 percent in 2013.

Qatar was the last of the four Gulf states to sign the aid accord with Morocco. It was not immediately clear whether Qatar would disburse the aid installments for both 2012 and 2013, each worth $250 million, together.

The Gulf states have agreed a similar package of aid, also worth a total $5 billion over a five-year period, for Jordan. (Reporting By Zakia Abdennebi, writing by Aziz El Yaakoubi, editing by Gareth Jones)

Our Standards: The Thomson Reuters Trust Principles.