NCR Corp. posted first-quarter profit and revenue that topped Wall Street's expectations Tuesday thanks to strength in its hospitality and retail divisions.

NCR, which makes ATMs, self-service checkout machines and airport check-in-kiosks, also raised its profit outlook for the year. Its shares rose 4 percent in after-hour trading.

NCR posted a profit of $61 million, or 37 cents per share, in the three-month period ended March 31. That compares with a loss of $19 million, or 6 cents per share, in the year-ago period.

Revenue rose 13 percent to $1.41 billion from $1.24 billion in the year-ago period.

It said its net income amounted to 54 cents a share after adjusting to exclude one-time items.

Analysts had expected adjusted net income 41 cents on revenue of $1.34 billion, according to FactSet.

NCR expects full-year revenue to increase 9 percent to 11 percent compared with the year ago. NCR posted revenue of $5.73 billion in 2012, implying that it expects to post $6.25 billion to $6.36 billion this year. It anticipates earnings for the full year to be in the range of $2.70 per share to $2.80 per share, up from an earlier forecast of $2.65 to $2.75 a share.

Analysts had expected earnings per share of $2.71 per share on revenue of $6.31 billion.

"The first quarter represented a solid start to 2013 and we are raising our profitability outlook for the full year," said Bill Nuti, chairman and CEO of NCR, in a statement. "We are executing well across our lines of business, led by strong momentum in our retail solutions and hospitality segments."

The company's financial services segment posted first-quarter revenue of $714 million, an increase of 3 percent from the year-ago period.

NCR's Retail Solutions generated revenue of $489 million in the first quarter, up 41 percent from the year-ago period. That surge reflected in part the company's acquisition of software provider Retalix Ltd. in February. Retalix revenue was $50 million in the first quarter of 2013 and contributed $9 million to operating income.

The company's hospitality division generated revenue of $131 million in the first quarter, an increase of 16 percent compared with the year-ago period. NCR's emerging industries division posted revenue of $76 million, a decline of 15 percent compared a year ago.

NCR's shares rose $1.03 to $28.30 in extended trading following the release of the earnings report. They ended the regular trading session up 42 cents to $27.27.