SAN FRANCISCO — As Twitter has struggled to attract new users, the one bright spot has been its ability to wring more and more advertising dollars from marketing messages shown to the people on its service.

Now, under intensifying competition from companies like Facebook, its once-blistering ad growth is faltering — and so is Twitter’s stock.

Twitter posted weaker-than-expected financial results for the first quarter on Tuesday and told investors to reduce their expectations for the rest of the year.

The quarterly report, which was supposed to be published after the stock market closed, was obtained early and posted on Twitter by the financial analytics firm Selerity. The release sent Twitter shares plunging. Trading was briefly halted so the company could disseminate its results. That steepened the drop, and the stock ended the day down about 18 percent.