Czech Prime Minister Stanislav Gross (search) resigned on Monday, ending weeks of political crisis sparked by a scandal over the financing of his luxury apartment.

President Vaclav Klaus (search) accepted the resignation, his spokesman Petr Hajek said. According to the constitution, the Cabinet is dissolved when the prime minister resigns.

Earlier on Monday, Gross' Social Democrats and their coalition partners, the Christian Democrats and the Freedom Union, signed a deal for a new government headed by Jiri Paroubek, the Social Democrats' vice chairman.

Gross had headed the government since last July. He succeeded Vladimir Spidla, who stepped down as prime minister and leader of the Social Democratic Party after its poor showing in June's European parliamentary elections.

The current political crisis began earlier this year when Gross was unable to explain how he paid for his apartment. He first said he financed it with the help of a mortgage, but later said he borrowed money from his uncle. Czech media later reported that his uncle had borrowed the money from a journalist he barely knew.