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 14 percent to $1.03 billion, outpacing the analysts' view of $968.6 million. The company said revenue from hardware sales rose 26 percent, while supplies revenue -- which is more profitable -- rose 10 percent.

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.

On a conference call with analysts, Lexmark Chief Executive Paul Curlander refuted the notion that Lexmark's gains had come because its rivals were on the sidelines, particularly with business customers, who do not easily switch printing partners.

Enterprise sales are not transactional sales, he said. It is not a case where we're trying to buy an HP product today, and if HP doesn't have it they buy from somebody else. We're winning because we have won enterprise three-to-five year contractual deals and management services deals in the first half of 2010 and over the last several years that are still growing out.

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 added that its expectations for full-year revenue and earnings have increased and that it now expects high-single-digit revenue growth versus 2009 results.

The company's shares rose 10.5 percent to $38.45 in early afternoon trading on the New York Stock Exchange, where it was one the top percentage gainers.

(Reporting by Franklin Paul; Editing by Lisa Von Ahn, Leslie Gevirtz)