* GDP growth rate of 0.6 pct q/q in Q2, annual 2.1 pct
* Household and state consumption drive growth
* Last major output figures before Sept 24 election (Adds election context, court ruling on ECB bond-buying programme)
BERLIN, Aug 15 (Reuters) - Strong household and state spending consolidated Germany's role as the euro zone's growth engine in the second quarter, helping Chancellor Angela Merkel to burnish her economic credentials less than six weeks before an election.
Tuesday's data are the last major growth figures to be published before the Sept. 24 vote, in which Merkel is seeking to win a fourth term.
Merkel's conservatives enjoy a comfortable lead over the Social Democrats (SPD), their current coalition partner; an INSA poll on Tuesday put their support at 37 percent to the SPD's 25.
Yet while neither party wants another grand coalition, a fractured political landscape could make it hard to form another viable alliance.
In the second quarter, Germany's seasonally adjusted gross domestic product (GDP) was up 0.6 percent from the previous quarter - just below the consensus forecast of 0.7 percent in a Reuters poll, but still the 12th consecutive quarterly growth reading.
In addition, first-quarter growth was revised up to 0.7 percent from 0.6. Annual growth in the second quarter, adjusted for calendar effects, rose to 2.1 percent from 2.0.
"The German economy is proving its staying power, the upswing continues," Bankhaus Lampe economist Alexander Krueger said, adding that the European Central Bank's low interest rates and bond-buying programme kept on boosting domestic demand.
Germany's Constitutional Court said it had declined to hear a challenge to the ECB's 2.3 trillion euro ($2.7 trillion) asset purchase scheme, referring the case instead to the European Court of Justice.
Second-quarter growth was mainly driven by domestic demand as households and state authorities increased their spending and firms boosted investment in buildings and equipment, the Statistics Office said.
German consumers are benefiting from record employment, rising real wages and low borrowing costs. State authorities are also spending billions of euros on accommodating and integrating more than one million refugees who have arrived since the start of 2015, many from war zones in Syria and Iraq.
In addition, a growing population, increased job security and record-low interest rates are fuelling a construction boom in Europe's biggest economy.
Growth in the second quarter was dampened, however, by net foreign trade, since exports rose less strongly than imports, which the vibrant domestic economy sucked in at a higher rate.
"Germany's economic success story goes on and on and on," ING Bank analyst Carsten Brzeski said, adding there was very little reason to fear a sudden end to the current performance.
He cautioned, however, that the main drivers supporting the domestic economy, such as rising employment, rising wages and increased government spending, could lose some momentum in the coming quarters.
"The same holds for the export sector, where a stronger euro, weaker-than-expected U.S. growth and Brexit uncertainty could take some wind out of the sails without bringing exports to a halt," Brzeski said.
Unadjusted data showed the economy growing by 0.8 percent on the year in the second quarter. Easter fell in April this year while it was in March last year.
The Statistics Office provided only a qualitative assessment of the main growth drivers in the second quarter. A more detailed breakdown will be published on Aug. 25.
The data underlines the continued strength of the German economy compared with its European peers.
The French economy, the second-largest in the euro zone, grew 0.5 percent in the second quarter, helped by stronger exports, according to preliminary data.
In Italy, the third-biggest economy in the 19-member bloc, the national central bank expects a quarterly expansion roughly in line with the first quarter's increase of 0.4 percent. Preliminary data are due on Wednesday.
The Spanish economy keeps powering ahead, however, with a growth rate of 0.9 percent in the April-June quarter.
This was well above the euro zone average of 0.6 percent, according to preliminary estimates released by the European Union's statistics agency this month.
Outside the euro zone, Britain's economic output grew by 0.3 percent on the quarter, edging up from 0.2 percent in the first three months.
(Reporting by Michael Nienaber; Editing by Paul Carrel and Kevin Liffey)