* AIB FY loss halves, operating profit 445 mln euros
* Targets net interest margin of over 2 pct over medium term
* Eyes preference share conversion, CoCo sale over time
* Does not expect to need fresh capital after stress test
DUBLIN, March 5 (Reuters) - State-owned Allied Irish Banks (AIB) more than halved its full-year loss in 2013 and returned to an operating profit as it set new medium-term goals on Wednesday ahead of its potential reprivatisation next year.
It cost taxpayers more than 20 billion euros to bail out AIB, the most given to any lender that survived Ireland's debt crisis. The bank has shut branches and is cutting almost a fifth of its staff in an effort to return to profit during this year.
The bank said it was on track return to profitability and is aiming to increase its net interest margin above 2 percent over the medium term. It also announced a review of its capital structure to prepare the bank for sale in 2015.
"If you look at an investor viewing AIB as the macro-equity play on the country, they want to see clarity around capital," Chief Executive David Duffy told Reuters in an interview.
"We want to get to a position this year where we prove there is no need for more capital under the stress element, we have delivered on sustainable profitability and on that basis, there is an investable bank."
The bank said the review would include examining the 1.6 billion euros ($2.2 billion) of contingent capital notes (CoCos) that act as a buffer against any need for future capital and a potential conversion of its preference shares into equity.
Alongside the target to bring the net interest margin - a measurement of the profitability of its lending - in line with rival Bank of Ireland's at 2 percent, the bank said it would aim to keep its core Tier 1 capital ratio above 10 percent complying with more demanding Basel III capital rules due to be phased in by 2019.
The bank's core Tier 1 capital ratio, a measure of financial strength, was at 14.3 percent at the end of December, 10.5 percent complying with Basel III, while it finished the year with a net interest margin of 1.67 percent.
While lenders shrunk their balance sheets as part of Ireland's EU/IMF bailout, soured loans have made a return to profitability elusive and AIB made a post-impairment loss of 1.68 billion euros in 2013 versus 3.72 billion a year earlier.
Part state-owned Bank of Ireland became the country's first lender to fully return to profit since the start of Ireland's financial crisis when it said this week that its first two months of the year had been profitable.
Excluding a provision of 1.9 billion euros for impaired loans, down a quarter on a year ago, AIB said it made an operating profit of 445 million euros last year, driven by a 16 percent year-on-year fall in operating costs.
The bank also said the pace of increase in residential mortgages in arrears decreased in the second half, a day after data from Ireland's central bank showed that the number of homeowners in arrears for more than 90 days fell for the first during the downturn.
The bank's proportion of owner-occupiers in arrears for more than 90 days stood at 11.1 percent at the end of December, while almost a quarter of all buy-to-let mortgage holders were behind on payments for the same timespan.
"Given recent positive macro developments coupled with recovering fundamentals, AIB's capacity to articulate an attractive investment case is improving, which bodes well for the bank's planned reprivatisation," said Ciaran Callaghan, an analyst at Merrion Stockbrokers.