Allied Irish Banks would gain 2 billion euros ($2.9 billion) in cash by selling its stakes in two U.S. and Polish banks, but wants to keep its holding in Poland's BZ WBK BZWB.WA, a brokerage said on Friday.

After a meeting with AIB executives, analysts at Dublin-based Bloxham said Allied Irish would try to sell its 24 percent interest in U.S.-based M&T Bank Corp but had emphasised its long-term commitment to its majority in BZ WBK.

Allied Irish last week said it was considering asset sales as one of the ways of raising capital to plug the gap that will be left after it transfers 24 billion euros of assets to Ireland's bad bank.

It said it aimed to raise 2 billion euros over the next year and a half through some combination of a possible rights issue, asset sales and by tapping strategic investors. A spokeswoman said the bank's stance has not changed since then.

Bloxham said Allied Irish would not be selling its Polish bank stake as part of any fund-raising programme.

The comment (on the potential gains) was a reflection of the fact that there is a lot inherent value built up in the two stakes, it wasn't an indication that they are going to sell (the Polish stake), Bloxham Head of Research Kevin McConnell told Reuters.

Bloxham said it remained uncertain when the M&T stake would be sold, partly as M&T was searching for a new chief executive, but there would be more clarity by November as Irish banks start transferring loans to the National Asset Management Agency (NAMA).

Moving toward the end of the year AIB could be in a much stronger position to outline the future of the bank and what a 'cleansed' and potentially recapitalised AIB will look like, Bloxham said in a note.

Shares in Allied Irish were 5.3 percent higher by 1054 GMT at 3.36 euros, while the wider Irish market .ISEQ was 0.7 percent stronger.

On Thursday Allied Irish said it raised 1 billion euros in three-year funding without relying on the government's bank guarantee scheme, which it said reflected the clarity NAMA has given to investors.

After AIB's successful 'un'guaranteed ... issuance yesterday, the liquidity door appears to be opening in a fraught market, Bloxham said.

(Editing by Greg Mahlich and David Holmes) ($1=.6810 euros)