British Prime Minister Theresa May apologized to her party Wednesday for a disastrous election result and promised economic help for struggling families, as she tried to restore momentum to a divided government.

In a Conservative Party conference speech full of idealistic language but interrupted by a prankster, May said the election campaign had been "too scripted, too presidential."

"I led the campaign, and I am sorry," she said.

The Conservatives are in a sour mood after June's snap election — called three years early in hopes of bolstering the party's majority in Parliament — saw May's government reduced to a minority administration. The poor result has left May weakened and struggling to unite a government divided over Brexit and other issues.

May closed the party's annual conference with a speech telling ministers to "shape up" and focus on "the daily lives of ordinary working people."

In a bid to appeal to middle- and lower-income voters, May promised to put a price cap on energy bills and to get government back into the business of building public housing.

British governments, including Conservative ones, built hundreds of thousands of homes in the decades after World War II.

But Conservative Prime Minister Margaret Thatcher's decision in the 1980s to allow properties owned by local authorities to be sold to residents marked a major shift, and in the last two decades successive governments have largely left house-building to the private sector.

May promised "a new generation of council houses to help fix our broken housing market."

Rising prices have made home ownership an increasingly elusive goal for many, especially in London and other big cities.

May needed a strong speech to help fight off rivals to her job, including ambitious Foreign Secretary Boris Johnson.

But the address did not go entirely to plan. May struggled with a cough and a hoarse voice that forced her to pause repeatedly.

Midway through the speech a prankster walked up and handed May a P45, the form given to people being laid off.

BRITAIN POLITICS CONSERVATIVE PARTY CONFERENCE 2017

Britain's cabinet members, left to right, are shown during May's speech to party members: Phillip Hammond, Amber Rudd, Boris Johnson, David Davis, Michael Fallon and Jeremy Hunt. (Facundo Arrizabalaga/EPA-EFE)

As he was bundled away by security, the joker — identified in media reports as comedian Simon Brodkin — said "Boris told me to do it."

May's office said the prankster had been arrested for breach of the peace and there would be a "thorough investigation" into how he was able to get into the high-security conference venue.

Brodkin, whose stage name is Lee Nelson, has pulled off other high-profile stunts including showering international soccer federation president Sepp Blatter with money during a 2015 press conference.

At the end of the speech, May was embraced onstage by her husband Philip, as Lenny Kravitz's Are You Gonna Go My Way? rang out in the auditorium.

That remains an open question. The speech did not resolve doubts about May's future.

To EU citizens: 'We want you to stay'

Her struggle to speak could be seen as a symbol of her vulnerability — or of her steely determination to carry on in the face of adversity.

Many blame the election result partly on her wooden campaigning style, which saw her dubbed the "Maybot."

"I know that people think I'm not very emotional," May said. "I'm not the kind of person who wears their heart on their sleeve."

But she fought back against "Maybot" claims, saying passion for social justice "burns inside me" and highlighting her work against racism and to establishing an inquiry into child sexual abuse.

She even made a rare personal reference, saying "it has always been a great sadness for me and Philip that we were not blessed with children."

Amid increasing political polarization around the world, May called for a more humane politics, saying "people are fed up with the game-playing, the name-calling."

She vowed to work for an inclusive, open Britain, seeking to allay fears that the country will become more insular after it leaves the European Union.

She told EU citizens living in Britain "we want you to stay," and said that after Brexit, the country would not be one retreating behind borders, but "a global Britain that stands tall in the world."

May said the government wanted divorce talks with the bloc to end in a good deal, but was "prepared in the event that they do not."

May's speech was also overshadowed by furor over Johnson's comment that a Libyan city could become a tourism hub once they "clear the dead bodies away."

Conservative lawmakers condemned the remarks as crass and tasteless, and several called for Johnson to be fired.