(Reuters) -- Groupon Inc posted its first quarterly profit Monday as the world's largest daily deal company reined in marketing spending while signing up more customers and merchants, sending its stock 11 percent higher.

The daily deals company started by music graduate Andrew Mason said it now had 36.9 million active customers, and surpassed 100,000 merchants served in the first quarter.

The after-hours rally to about $13.17 followed a gain of more than 18 percent in regular trading on Nasdaq, its largest single-day gain since it went public in November.

Revenue came in much higher than expected and margins were higher, said Sameet Sinha, an analyst at B. Riley & Co.

The domestic side of Groupon's business did well, he added. They may be doing a better job of marketing or their new businesses may be gaining traction.

Groupon's operating profit margin was 7 percent in the first quarter, while Wall Street was looking for a 6.5 percent margin, Sinha noted.

First-quarter pro-forma net income, which excludes option expenses, was 2 cents per share, versus a net loss of 41 cents a share, a year earlier. Revenue was $559.3 million, compared with $295.5 million in the first quarter 2011.

Groupon was expected to make 1 cent per share in pro-forma first-quarter earnings, according to Thomson Reuters I/B/E/S. Net revenue was forecast to be $531 million.

(Reporting by Alistair Barr; Editing by Richard Chang)