AOL (AOL) beat the Street on Tuesday by swinging to a solid third-quarter profit thanks to stronger-than-expected revenue growth amid an uptick in ad sales.

Shares of the Internet company jumped 3% in the wake of the earnings beat, putting them on track to extend their 2012 surge of nearly 140%.

New York-based AOL said it earned $20.8 million, or 22 cents a share, last quarter, compared with a loss of $2.6 million, or 2 cents a share, a year earlier. Analysts had been calling for EPS of 17 cents.

Revenue was unchanged at $531.7 million, but that surpassed the Street’s view of $522 million.

AOL said ad sales rose 7% to $340 million, yet display sales dipped 1% to $135.4 million due to a 3% contraction domestically. International display ad sales soared 18% to $12.9 million, while search and contextual ad sales increased 8% to $91.8 million.

“We just reported the best relative revenue performance in seven years and the second consecutive quarter of year-over-year profit growth, exceeding our expectations,” CEO Tim Armstrong said in a statement. “We have positioned AOL for growth in 2013 and beyond with consumer and advertiser demand growing for our premium content and innovative products, video, services and ad formats.”

AOL said its subscription revenue dropped 10%, down from a 22% tumble the year before and the lowest rate of decline in six years.

Wall Street cheered AOL’s results, bidding its stock 3.04% higher to $36.90 ahead of Tuesday’s open. The bar had been set relatively high as the stock has surged 137% so far this year.

Follow Matt Egan on Twitter @MattMEgan5