Exxon Mobil Corp said on Thursday that first-quarter profit rose 38 percent on higher crude prices and output, but the results missed Wall Street expectations as recently enacted U.S. healthcare legislation took a toll on results at the largest U.S. oil company.

Our results reflect higher crude oil realizations and stronger chemical margins while the downstream industry margins remained weak, Rex Tillerson, Exxon's chief executive, said in a statement.

Benchmark U.S. oil prices averaged nearly $79 a barrel in the first quarter, about $3 above the quarter before and sharply higher than the $43 average of the first quarter of 2009.

Exxon's profit in the quarter was $6.3 billion, or $1.33 per share, compared with $4.55 billion, or 92 cents per share, a year earlier.

Exxon also said recently enacted U.S. healthcare legislation hurt earnings by $200 million, or about 4 cents per share.

Wall Street analysts had expected Exxon to report a profit of $1.41 per share, according to Thomson Reuters I/B/E/S.

Jason Gammel, oil analyst at Macquarie Research, characterized Exxon's first-quarter profit as a pretty big miss, and attributed the bulk of the shortfall to the Exxon's accrual for the healthcare legislation.

The company' oil equivalent production rose 4.5 percent from a year ago, fueled by the company's liquefied natural gas (LNG) projects in Qatar, it said.

The production numbers looked great, I was looking for 2.5 percent growth, Gammel said.

Revenue rose to $90.25 billion from $64.03 billion. Analysts had expected revenue of $96.4 billion.

Shares of Exxon fell nearly 2 percent to $67.92 before the start of regular trading.

(Reporting by Anna Driver in Houston and Matt Daily in New York; Editing by Lisa Von Ahn, Dave Zimmerman)