* Cash profit for 1H21 rose to A$3.5 bln vs A$3.2 forecast

* Targets A$8 bln cost base by 2024, smaller head office, branches

* Result and cost target better thane expected - analysts

SYDNEY, May 3 (Reuters) - Australia's Westpac Banking Corp will close some branches and shift focus to digital banking under a cost-cutting plan unveiled on Monday as it reported that first half cash earnings more than tripled from a year ago.

The country's second largest bank said costs will initially increase this fiscal year as it sells non-core businesses and beefs up its digital offering, before starting to fall from fiscal 2022.

Cash earnings for the six months ended March 31 rose to A$3.54 billion, compared with A$993 million last year and above a forecast of A$3.28 billion in a Reuters poll.

Westpac booked a A$372 million impairment benefit over the half as it released money it had set aside to cover potential COVID-19 losses.

Australia's success in controlling the spread of the coronavirus and unprecedented monetary and fiscal stimulus have helped the job and housing market rebound, encouraging Westpac and other banks to wind back conservative loss estimates.

"It has been a promising start to the year with increased cash earnings ... mainly due to an impairment benefit reflecting improved asset quality," Chief Executive Officer Peter King said in a statement.

However, he cautioned that "while the economic outlook is more positive, there is still some uncertainty."

Australia's second-largest bank also declared an interim dividend of 58 cents per share, in line with estimates. It did not pay one last year as its profit dived due to massive writedowns and provisions to account for the uncertainty and economic deterioration arising from the pandemic.

The bank's shares rose 3.5% in early trade as investors welcomed the cost-cutting strategy.

Westpac, which has lagged its peers due to complex and inefficient systems, said it plans to bring costs down to A$8 billion ($6.17 billion) a year by fiscal 2024, from A$10.1 billion in fiscal 2020.

Aging software and convoluted procedures have been the Sydney-based lender's main enemy, leading to record fines due to breaches of anti-money laundering law and market share losses in mortgages, its main product.

Westpac said it will "rationalise duplicate metro branches" and have smaller customised branches.

"While more details are expected and will be necessary, we expect the magnitude, timing and costing of this cost program to be viewed favourably by the market," Goldman Sachs analysts said in a note.

ASSET SALES

Faced with greater regulatory scrutiny, Westpac has agreed to an enforceable undertaking with the banking regulator to address risk governance concerns and has sold non-core assets as part of efforts to simplify its business.

It is still considering whether to spin off its New Zealand unit, which saw mortgage lending rise 10% over the half, even as the country seeks to cool its red-hot housing market.

"I am committed to delivering on the comprehensive plans that are now in place, including strengthening risk management, growing our core franchise, and delivering a competitive cost base," King said.

Westpac's mortgage book increased by A$2.6 billion in the half, but credit card, personal loan and auto lending declined. ($1 = 1.2960 Australian dollars) (Reporting by Paulina Duran in Sydney, and Rashmi Ashok and Nikhil Kurian Nainan in Bengaluru; Editing by Diane Craft, Peter Cooney and Jane Wardell)