LONDON (Reuters) - Britain's opposition leader Keir Starmer said on Friday he wanted to recognise a Palestinian state if he won power in an upcoming general election, but said that such a move would need to come at the right time in a peace process.

Ireland, Spain and Norway announced this week that they would recognise a Palestinian state on May 28, prompting an angry response from Israel which said this amounted to a "reward for terrorism" and recalled its ambassadors from the three capitals.

The Labour Party has been engulfed by an internal battle over its policy to the war in Gaza since the Oct. 7 attack by Hamas that led to Israel's invasion.

Starmer has faced criticism for some traditional Labour voters for only gradually shifting the party's position towards supporting a ceasefire in Gaza.

The party's stance led to 10 senior party lawmakers quitting their policy roles and was blamed for a handful of disappointing results in this month's local elections in some areas with large Muslim populations.

Asked if he thought Palestine should be a state, Starmer told the BBC: "Yes, I do, and I think recognition of Palestine is extremely important. We need a viable Palestinian state alongside a safe and secure Israel, and recognition has to be part of that."

Starmer said recognition of a Palestinian state would need to come at the right time in a peace process, but "I absolutely believe in it", arguing a two-state solution was essential for lasting peace in the region.

The two-state solution has long been the framework of British foreign policy and international efforts to resolve the conflict but the peace process has been moribund for years.

The current Conservative government, and other big European states such as France and Germany, have also voiced support in principle for a Palestinian state, but with the timing of recognition forming part of a broader peace process.

This week, Labour backed the independence of the International Criminal Court after it sought arrest warrants for both Hamas and Israeli officials for war crimes, opening up a divide with the governing Conservative Party.

The Conservative government said the ICC did not have the jurisdiction to request the arrest warrants and it would not help get Israeli hostages out of Gaza, get humanitarian aid in, or deliver a sustainable ceasefire.

(Reporting by Andrew MacAskill; Editing by Alex Richardson)