TOKYO, May 20 (Reuters) - Japan’s Nikkei share average edged higher on Monday as growth in the nation’s economy unexpectedly accelerated in the first quarter, although market gains were limited as the data also pointed towards lacklustre domestic demand.

The Nikkei ended 0.2% higher at 21,301.73.

Data released on Monday showed Japan’s gross domestic product (GDP) grew at an annualised 2.1% in the first quarter versus expectations of a 0.2% contraction. However, the surprise expansion was mostly caused by imports declining faster than exports, leading to a net exports contribution to GDP.

“The GDP surprised for the better and that’s the main driver behind the stock market’s gains. Those who bet on weak data were caught wrong-footed and reversing their positions,” said Takashi Hiroki, chief strategist at Monex Securities.

Yet on the whole the GDP data “is not encouraging, with private consumption and capex declining and exports rising only because weak domestic demand depressed imports,” he said, adding that Monday’s market advance “is purely technical, few are buying because they think the economy is doing well.”

Exporters gained as the yen weakened to a two-week low against the dollar.

NEC Corp added 1.4%, Canon Inc rose 1.1% and Nintendo Co 1.4%.

Technology firms, on the other hand, sagged after U.S. counterparts slipped on Friday due to persistent trade tensions between the United States and China.