* 52 eur/shr plus dividend offered in deal dubbed 'Project Star'

* Groups face investments in insulation, fittings for elderly

* Deutsche Wohnen shares rise 16.4%, Vonovia shares fall 6.8%

* Companies to offer to sell Berlin 20,000 flats (Adds Finance Minister quote)

FRANKFURT, May 25 (Reuters) - Germany's two biggest listed landlords Vonovia and Deutsche Wohnen have agreed to join forces in an 18 billion euro ($22 billion) deal they hope will defuse tensions over soaring rents ahead of general elections in September.

The country's biggest merger this year will create a European real estate giant with 550,000 apartments. It comes as Deutsche Wohnen has become the focus of popular anger in Berlin over tenant rights and affordable housing.

The transaction - the largest European real estate deal on record according to Refinitiv data - is Vonovia's third attempt to swallow Deutsche Wohnen.

While analysts said the deal should encounter few antitrust hurdles in a fragmented market, it is controversial politically.

In Berlin, Deutsche Wohnen's home base, rents have more than doubled since 2008, prompting the local government to impose a cap on rent rises in 2020. However, the Constitutional Court overturned that last month.

Left-wing campaigners have responded by collecting 130,000 signatures to force a public vote on seizing apartments from "Deutsche Wohnen & Co". The group behind the petition said it would fight the merger.

To try to secure political support for the deal, the two companies pledged to limit regular rent increases to 1% per year in Berlin for the next three years and inflation-adjusted increases for the following two years.

'NO TENANT WILL BE HURT'

They said the merged company, with a combined market valuation of about 47 billion euros, would work with politicians on providing affordable housing and they have offered to sell about 20,000 apartments to Berlin for at least 2 billion euros.

Vonovia CEO Rolf Buch also cited a need to make apartments more energy efficient and more suitable for the elderly and promised to build 13,000 new apartments in the German capital.

Deutsche Wohnen CEO Michael Zahn, who will become Buch's deputy, said: "No tenant will be hurt by this transaction."

German Finance Minister Olaf Scholz, the Social Democrat (SPD) candidate for chancellor in the September election, told Handelsblatt newspaper that the planned merger showed that tenant protection had to top the agenda.

"A rent moratorium is needed for the next few years. And if a self-imposed rent moratorium isn't a problem for a DAX company, there can be no reasonable objection to it," he said, adding that building affordable housing was unavoidable.

Under 'Project Star', which two financial sources said was agreed in less than two weeks, Vonovia will pay 52 euros per share and Deutsche Wohnen shareholders will retain the rights to a 1.03 euro per share dividend.

This represents a premium of about 18% on the closing price on Friday.

Shares in Deutsche Wohnen rose as much as 16.4% on the news delivered in a statement after Monday's market close, while Vonovia shares fell as much as 6.8%.

A hostile 9.9 billion euro takeover bid by Vonovia in 2016 failed to win acceptance from Deutsche Wohnen shareholders.

This time, Deutsche Wohnen's Zahn said he was "very, very certain" that more than the required 50% of Deutsche Wohnen shareholders would tender their shares to Vonovia.

'HOUSING MARKET IS BROKEN'

Fabio De Masi, a parliamentarian from the left-wing Linke party that is part of Berlin's city government, urged the competition authorities to block it.

"The housing market is broken," he said in a statement.

Even with its substantial lead over other German residential property groups, Vonovia only has a 0.9% share of Germany's residential market, according to credit rating agency Scope, which has said a takeover would face few antitrust concerns.

However, Marcel Fratzscher, head of the Berlin-based German Institute for Economic Research (DIW), said both groups already had considerable influence on rents and property purchase prices, meaning competition authorities could have concerns.

Vonovia said it had bridge financing of 22 billion euros for the deal, to be refinanced by measures including an 8 billion euro rights issue in the second half of 2021, following the transaction's close.

"It makes sense strategically," analysts at Jefferies said in a note, even though the synergies were low.

Deutsche Wohnen is being advised by Deutsche Bank, Goldman Sachs, J.P. Morgan, UBS, 7Square and Sullivan & Cromwell. Vonovia's advisers include Perella Weinberg, Bank of America and Morgan Stanley. ($1 = 0.8187 euros) (Reporting by Ludwig Burger, Matthias Inverardi, Alexander Huebner and Pamela Barbaglia; Additional reporting by Christoph Steitz and Emma Thomasson; editing by Kim Coghill, Barbara Lewis and Jason Neely)