Singapore's non-oil domestic exports (NODX) contracted for a second straight month in May, but the decline was less than expected as electronics shipments from the city state continued to be strong.

NODX fell 1.2 percent in May on a year-on-year basis, trade agency International Enterprise (IE) Singapore said Friday. That was better than a 3.7 percent decline projected by Reuters.

On a month-on-month seasonally adjusted basis, it climbed 8.1 percent in May compared with a Reuters forecast of 3.6 percent. NODX came in at 14.6 billion Singapore dollars ($10.59 billion) in May on a seasonally adjusted basis, higher than the 13.5 billion Singapore dollars in April, IE said.

NODX is a closely watched data in the Southeast Asian city state reliant on external trade to power its economic expansion. A recent pick up in global trade has allowed Singapore to register five straight months of NODX growth before pulling back in April, which many economists had called a temporary blip.

Singapore's key electronics sector has been a particular beneficiary of the global recovery. Shipments of electronic products jumped 23.3 percent year-on-year in May – its seventh straight month of growth, according to IE data.

"The firm electronic exports and output in recent months may partly reflect inventory building ahead of high-profile smart phone launch later this year," ANZ Research economist Ng Weiwen wrote in a note.

But the decline in non-electronics segment outweighed the strength in electronic exports. The 9 percent fall in shipments of non-electronic products was led by lower demand for civil engineering equipment parts, non-monetary gold and pharmaceuticals, IE data showed.

Economists were willing to overlook the two straight months of NODX contraction.

"The two straight months of NODX declines is not a cause for concern at this juncture amid the healthy electronics momentum and resilience in key NODX markets," said Selena Ling, head of treasury research and strategy at OCBC Bank.

"NODX growth is coming off a very strong first quarter and January-May NODX growth was already 8.8 percent year-on-year. So some normalization is to be anticipated, but electronics exports remains the key to watch going ahead," she added.

Overall, Singapore's total trade still rose 14.3 percent in May from a year ago, with exports growing 11.4 percent and imports increasing 17.6 percent.