Twitter finally seems to be addressing its biggest challenge: attracting new users.

Ever since the company went public in 2013, it has been battling the perception that it's a dying platform. But Twitter showed signs of new life in the first quarter, reporting that average monthly active users rose 6 percent from last year to 328 million. The number of daily users has been increasing at a faster pace each quarter for the past year, Twitter said.

Chief Executive Officer Jack Dorsey may have managed to do what many analysts and investors thought wasn't possible in resurrecting user growth; now he faces a new challenge in boosting sales. Twitter reported its first decline in quarterly revenue since going public in 2013, though revenue of $548 million still beat analyst's estimates of $509 million.

The shares surged as much as 14 percent in premarket trading, rising to a high of $16.65. The stock was down 10 percent so far this year through the close of trading Tuesday.

Twitter plans to use its new momentum, combined with better ad pricing and improved returns on investment, to convince marketers to spend more. Still, it expects revenue growth to "meaningfully lag" audience growth for the rest of the year.

As Twitter struggles to define its future, it faces competitors with larger and faster-growing user bases, like Facebook Inc., Instagram and Snap Inc., which went public in the first quarter.

User growth "could be your first indicator that revenue could recover some day," said Mark Mahaney, an analyst at RBC Capital Markets. Still, it'll be tough, given the competition. "The investor issue is -- when do things get less worse?"

After a failed process to sell itself in 2016, Twitter wants to prove it can go it alone and reach profitability by the end of this year. It has wielded the ax in pursuit of that goal. The company sold its Fabric developer services business to Google, shut down its Tellapart ad tech offering, and cut some planned ad products. First-quarter earnings, excluding some items, came in at 11 cents a share, well ahead of the 1 cent analysts estimated.

Twitter said that some work to improve its product, such as showing people more relevant tweets at the top of their timelines, has attracted more visitors to the service. Efforts to curb abuse and harassment have led to a decrease in reports and blocking from users, which the company described as "meaningful progress."

Last year, Twitter embarked on a strategy to appeal to broader audiences by streaming live video on its site from sports, entertainment and news partners, including Bloomberg. The plan is working, as video ads were the fastest-growing ad unit, generating the most revenue, the company said. Still, it hasn't been enough to accelerate overall sales.

"It's more like the New York Times than it's like a tech company," said James Cakmak, an analyst at Monness Crespi Hardt. Twitter competes with many other companies that want premium video content, he said. For example, Twitter was outbid by Amazon.com earlier this year for rights to Thursday night NFL games. "They can't afford to keep up with the deep pockets that are willing to pay for that content."

The company's ad revenue is declining even as the overall market for digital advertising increases, and even as the site is constantly in the news because of prolific use by U.S. President Donald Trump. Trump's tweets haven't helped the company, Twitter has said.

"Revenue down isn't good," said Michael Pachter, an analyst at Wedbush Securities. "When Facebook grows by four Twitters a year, that tells you that there's something really wrong."