Asian stocks posted modest gains on Tuesday, led by shares in resource companies, as strong U.S. factory data and surging commodities prices offset fears that unrest in Egypt could spread elsewhere in the Middle East.

Brent crude oil futures steadied after topping $100 a barrel overnight for the first time since 2008, adding to concerns of a global fuel price spike even as policymakers in many emerging economies struggle to contain soaring food prices.

Data released in China showed manufacturing input prices were rising quickly, keeping pressure on the government to tackle inflation.

Figures from South Korea showed consumer inflation in January rose more than expected at the upper end of the central bank's target. Inflation in Indonesia was also higher than targeted, triggering pressure for rate rises, while in Thailand the rate dipped from December but the outlook for further policy rate rises remained unchanged.

The euro inched back up near a two-month high after a jump in euro zone inflation fueled expectations of an interest rate increase and as worries about Egyptian unrest abated slightly. The common currency stood at $1.3720.

Analysts said the euro could rise further, especially if European Central Bank President Jean-Claude Trichet talks tough on inflation after a Thursday policy meeting.

Japan's Nikkei share index and the MSCI index of Asian shares outside of Japan rose 0.16 percent and 0.23 percent respectively, with shares of energy and resource companies outperforming.

Relief that turmoil in Egypt was not escalating helped provide a floor for the market.

Investors are finally able to focus on corporate earnings and some stocks are set to benefit from expectations for their results and forecasts, said Masumi Yamamoto of Daiwa Securities Capital Markets.

Sentiment was supported by U.S. data showing factory activity in the Midwest hit a 22- year high in January as orders surged and employment prospects brightened, providing further signs that the economy would stay on a solid growth path this year.

Strong earnings reports and boosted mergers and acquisitions activity also prompted investors to take a more sanguine view of events in Egypt and renew purchases of riskier assets.

The Dow Jones industrial average closed up 0.68 percent overnight, while the Standard & Poor's 500 Index gained 0.87 percent.

Brent crude hovered just above $100 after soaring as high as $101.73 overnight, while U.S. crude futures steadied above $92.

Saudi Arabia said OPEC was concerned by unrest in Egypt, where protesters seeking the removal of President Hosni Mubarak planned a million-strong march on Monday, but saw no need for an immediate boost in output as there was no oil shortage.

London copper rallied to a record $9,832 on Tuesday and tin also rose to an unprecedented $30,400 a tonne and shanghai copper hits its highest in nearly four years.

Stock markets in Shanghai and Hong Kong were little changed with investors reluctant to stake out fresh positions ahead of long Lunar New Year holidays later this week.

China's official purchasing managers' index fell in January to its lowest level in five months. Though activity continued to expand, input prices rose quickly, keeping pressure on Beijing to tighten policy to contain inflationary pressures.

This indicates that the economic recovery trend is not yet clear, and we may see economic growth slow down a bit, Zhang Liqun, a government researcher, said in a statement accompanying the release.

The data signaled that demand for oil may not rise as quickly in China, the world's second largest oil user.

In Korea, the finance ministry said consumer inflation was expected to hover at the 4 percent range in the current quarter before softening to 3 percent in the second half. The index rose 4.1 percent in January, above a 3.9 percent forecast in a Reuters poll.

Indonesia's annual inflation picked up in January to a 21-month high of 7.02 percent, above the central bank's end-2011 target range of 4-6 percent. Some economists brought forward their expectations for a central bank rate hike to this Friday.

Annual core inflation in Thailand slipped to 1.3 percent from 1.4 percent in December, while headline inflation was stuck at around 3.0 percent. Economists said food price inflation was less marked than in other countries, but authorities had to keep close watch on rises in oil and raw materials.

(Editing by Daniel Magnowski)