Lexmark International Inc posted a higher-than-expected quarterly profit on Tuesday on strong sales of printers and supplies, and as improved demand for services helped beef up margins.

Shares of Lexmark, whose larger rivals include Hewlett-Packard and Xerox, rose more than 9 percent after the company also gave an optimistic forecast for the current quarter.

Lexmark, which in recent years reacted to shrinking profits by boosting development spending and moving away from sales of low-end printers in favor of advanced models for high-volume customers, posted its fourth consecutive quarter of year-over-year earnings growth.

Second-quarter net income rose to $85.1 million, or $1.07 a share, from $17 million, or 22 cents a share, a year earlier.

Excluding costs for restructuring and acquisitions, the profit was $1.23 a share, beating the analysts' average estimate of 93 cents, according to Thomson Reuters I/B/E/S.

Revenue rose to $1.03 billion from $904.6 million, outpacing the analysts' view of $968.6 million.

The results came the same day rival Canon Inc reported a 31.3 percent rise in office-equipment sales for the quarter. But the Japanese company said it faced a tough second half of 2010 as Europe's economic woes and the strong yen tempered its optimism on growth in developing markets.

Analyst Shannon Cross warned that Lexmark's momentum might slow if competitors wage a price war in the laser printer market.

Lexmark reported a solid second quarter, but the question is sustainability since their largest competitor, HP, will be more aggressive in coming quarters now that Canon has resolved its supply issue, she said, noting that Canon makes laser printers for HP.

Lexmark forecast a third-quarter profit of 90 cents to $1 a share, excluding special items, with revenue up in the mid- to high-single-digit percentage range.

Analysts had on average expected a profit of 81 cents a share on revenue of $987.5 million, according to Thomson Reuters I/B/E/S.

The company's shares rose 9.4 percent to $38.08 in premarket trading.

(Reporting by Franklin Paul; Editing by Lisa Von Ahn)