(Reuters) -- Texas Instruments Inc reported higher-than-expected fourth-quarter revenue on Monday as demand improved faster than expected because customers did not have enough chips in stock, signaling the end of an inventory correction.

TI shares rose more than 3.4 percent in late trade after the company also said it would close two older factories in Japan and Texas with 500 workers to cut costs.

The maker of chips for a broad array of products ranging from consumer electronics to industrial equipment saw a broad resumption of demand in December that continued into January, said Chief Financial Officer Kevin March.

We think our customers have reached a point where their (inventory) numbers were extremely lean, so they needed to order new chips quickly to meet demand, March told Reuters.

Before TI issued results, upbeat forecasts by smaller rivals Linear Technology and Xilinx last week had already made investors optimistic that a drawdown of chip inventories in the broader market may be ending.

Much of the chip industry has been in a funk since mid-2011, when manufacturers began to cut orders of new product and use up existing inventories due to jitters about a gloomy economy.

TI reported a fourth-quarter profit of $298 million, or 25 cents per share, compared with $942 million, or 78 cents per share, in the year-ago quarter.

Revenue fell to $3.42 billion from $3.53 billion, but above Wall Street's expectations of $3.25 billion, according to Thomson Reuters I/B/E/S.

TI had warned December 8 that chip demand was weak. It forecast fourth-quarter earnings per share in a range of 21 to 25 cents on revenue of $3.19 billion to $3.33 billion.

But March said that orders started to improve right away after the December update and remained strong for much of January until it saw a lull around the Chinese New Year.

TI's forecast for first-quarter revenue in a range of $3.02 billion to $3.28 billion was much weaker than Wall Street expectations for $3.47 billion, according to Thomson Reuters I/B/E/S.

But March blamed TI's weak revenue guidance for the current quarter on a decline in its baseband chip segment, which it plans to shutter by the end of this year.

Revenue from the baseband business, whose main customer is Nokia , will fall to about $75 million this quarter from $279 million in the fourth quarter, March said.

Excluding the decline in baseband revenue, he said TI's first-quarter revenue would have fallen 2 percent from the fourth quarter, compared with the more typical sequential decline of 4 percent.

The Dallas-based chip maker also said it would incur charges of about $215 million from the closure of a factory in Hiji, Japan and another in Houston, Texas in the next 18 months.

It already shouldered just over half the cost of the closures in the fourth quarter and expected the rest to hit in the next several quarters.

But once the closures are complete, TI said they would cut annual costs by about $100 million.

TI shares were up more than 3.4 percent at $34.34 in after-hours trading on Monday, compared with their Nasdaq closing price of $33.19.

(Reporting by Sinead Carew in New York; Editing by Steve Orlofsky, Matthew Lewis and Bernard Orr)