BUDAPEST, March 10 (Reuters) - Hungary's government agreed to sell its majority stake in savings bank Takarekbank on Monday to a local investment firm for 9 billion forints ($39.9 million). Magyar Takarek is a private company 75 percent controlled by savings banks and 25 percent owned by Hungarian mortgage lender FHB Bank FHBK.BU . ID:nL5N0LB4CS Prime Minister Viktor Orban's government overhauled the savings banking sector last year and injected more than a 100 billion forints of capital as part of a drive to boost domestic banks in a market dominated by foreign-owned lenders. Orban has often said more than half of the Hungarian banking sector should be held locally. FHB shares have more than doubled their value over the past three months according to Thomson Reuters data on market speculation that it could be involved in the sale of Takarekbank. At 1455 GMT its shares were down 5.3 percent. FHB will indirectly own 13.75 percent of Takarekbank after the transaction, it said in a statement. State-owned MFB and the National Post, through which the government owns its stake in Takarekbank, said in a statement that the government would retain regulatory powers over the sector as MFB will keep its stake in a vehicle set up to implement the integration of savings banks. They said this vehicle, SZHISZ, would keep the 136 billion forints the government injected into the sector. The management of Magyar Takarek aims to transform Takarekbank into the leading financial service provider in Hungary, news agency MTI cited them as saying. Magyar Takarek expects to close the transaction in the first half of the year. With 1,700 branches, savings banks have by far the biggest network in Hungary, but they control only about 5 percent of the overall lending market. Takarekbank's main competitors include OTP OTPB.BU , Hungary's biggest bank by total assets, followed by local units of Austria's Erste ERST.VI , Belgium's KBC KBC.BR , Germany's Bayerische Landesbank BLGGgi.F , Italy's Intesa Sanpaolo ISP.MI , Raiffeisen RBIV.VI and Unicredit CRDI.MI . ($1 = 225.59 Hungarian forints) (Reporting by Gergely Szakacs, editing by Louise Heavens) ((gergely.szakacs@thomsonreuters.com)(+36 1 327 4748)(Reuters Messaging: gergely.szakacs.thomsonreuters.com@reuters.net)) Keywords: HUNGARY SAVINGSBANK/