LONDON – British Prime Minister Gordon Brown made a dramatic bid to keep his beleaguered Labour Party in power after it was punished in elections last week, announcing Monday he will resign by September at the latest even if the Liberal Democrats — being wooed by the Conservatives — decide to join his party in government.

The political theater, played out in front of the iconic black door of No. 10 Downing Street, comes as David Cameron’s Conservatives — which won the most seats in Parliament but fell short of a majority — struggled in their attempts to win over the third-place Liberal Democrats.

Brown’s party has been willing to entertain supporting the Liberal Democrats’ demand for an overhaul of the voting system toward proportional representation, which would greatly increase that party’s future seat tallies. But the evening brought a further twist with a counteroffer from the Conservatives — a referendum on a less dramatic type of electoral reform.

While uncertainty prevails, to the displeasure of the markets, one thing appears certain: The career of Brown — the Treasury chief who waited a decade in the wings for his chance to become prime minister — is winding to an end.

Brown, looking statesmanlike but resigned to political reality, accepted blame for Labour’s loss of 91 seats in last week’s election and its failure to win a parliamentary majority.

No other party won outright either, resulting in the first “hung Parliament” since 1974 and triggering a frantic scramble between Brown’s Labour and the main opposition Conservatives to broker a coalition — or at least an informal partnership — with the Liberal Democrats.

“As leader of my party, I must accept that that is a judgment on me,” Brown said, offering to step down before the party conference in September.

Brown said Liberal Democrat leader Nick Clegg had asked to begin formal coalition talks with the Labour Party and said he believed their parties might form a center-left alliance.