DALLAS (AP) — Armando Cornejo learned on his 38th birthday that a three-month layoff from his job as an electrician was over.

His reaction to Thursday's news mirrored the outlook of the Texas economy: He was pleased to be afloat, but unsure how long it'll last.

"There's no more job security," said Cornejo, who lives in suburban Euless and was laid off because his company ran low on construction projects. "You've got to keep your options open."

The state learned that lesson in the 1980s, when an oil bust shocked the state into the realization that its economy wasn't diverse enough. Similar lessons from the savings and loan scandal a decade later, analysts say, are playing a role in Texas remaining somewhat insulated from the national economic downturn.

The state has managed to maintain job growth over the past year while 2.6 million jobs have been lost nationally. With foreclosures skyrocketing and home prices plunging in parts of the country, analysts say Texas homes are hanging on to their value.

"We are a much more diverse economy," said Ray Perryman, a longtime Texas economist. "We're a net importer of energy now. While the oil industry still helps the state, it's no longer the driving force in the entire state this time around."

Still, there are signs that Texas is getting caught up in the churn of the sputtering national engine.

—The state announced Friday that December was the third month in the past four to suffer job losses, and unemployment hit 6 percent for the first time since 2004.

—State legislators were greeted on the eve of their session's start this month with Comptroller Susan Combs' estimate that tighter consumer spending will lead to a $9 billion budget shortfall.

—Texas is projecting a $447 million shortfall in its unemployment fund by the fall after a temporary suspension last year of a tax that replenishes the fund.

Mark Dotzour, an economist at Texas A&M University, said the state's economy was "remarkably sturdy" last year but that 2009 presented a stiff challenge.

"It's difficult to get money to do anything right now when it comes to business investment," Dotzour said. "Consumers are scared of their future, and businesses are scared of the government. What you have is a toxic combination where it causes everybody to sit on their hands and do nothing."

Just not quite yet in Texas.

Perryman and Dotzour said the state avoided the housing crisis because homebuilders started slashing production long before inventory became a problem. Dotzour added that it helped that Texas avoided the speculation that hit some markets where home values were appreciating 30 to 40 percent.

Some of the state's biggest homebuilders are national companies that applied the same cutbacks in Texas even though it wasn't having the same problems as California, Florida, Arizona and Nevada, Dotzour said.

"Which is kind of surprising because I remember thinking in 2007 that those big homebuilders, when they cut their volume back in Nevada, they may try to really juice up their volume in Texas," Dotzour said. "I was pleasantly relieved to see that our new home starts were dropping at the same percentage level as you were seeing on the East and West Coast."

Perryman points to lenders as another key component of Texas' fairly steady home market. He said the state was hit "first and worst" by the savings and loan crisis that eventually affected the rest of the country nearly 20 years ago, leaving behind a strong network of smaller regional and local banks.

"They've had very strong, very conservative lending practices," Perryman said. "We weren't involved in the sub-prime (lending crisis) … and haven't had the same difficulties as other places have had."

Perryman said 2008 was a good year in part because of strong commercial construction, including the new $1.2 billion Dallas Cowboys stadium going up in Arlington and big hotel projects in the Dallas-Fort Worth and Houston areas. But Dotzour warned that commercial construction was something of a bubble in Texas right now.

"We're seeing a marked slowdown in construction for both residential and commercial buildings," Dotzour said. "I expect we're going to see kind of a curtailment in government spending projects as well. Obviously, we're going to catch our fair share of the slowdown here in 2009."

The job market is starting to show those signs. The December losses were spread across nearly all industries, including 5,100 jobs in natural resources and mining. That's significant because analysts say the surging oil and natural gas sectors helped Texas buck the national trend of job losses.

Kisha Wilson of Fort Worth was among those who lost their jobs in December, even though she'd been in the auto loan department at Citigroup Inc. for 10 years. The 33-year-old single mother has three children to support but wants to go back to school to be a nurse. She and Cornejo, the electrician, remained upbeat, both citing the prospect of President Barack Obama turning around the economy.

"I feel he's going to make it happen," Wilson said.

The state landed a couple of major boosts without Obama's help. The Chinese company Taijin Pipe Group Corp. recently agreed to a $1 billion project for an oil and natural gas pipe manufacturing facility in the Corpus Christi area. And construction equipment maker Caterpillar Inc. plans to bring 1,400 jobs to the Seguin area.

Caterpillar is getting $10 million from the Texas Enterprise Fund, one of several economic development incentives that Perryman says have helped keep the state out of the national tailspin.

"To keep those things going and building on them is very important," Perryman said.

Nick Samuels, a state analyst for Moody's Investors Service in New York, said it was hard to tell where the Texas job market was headed. He warned that while the state's unemployment was below the national average, it was growing faster than the U.S. rate.

"Along with the national decline, the state isn't going to be immune," Samuels said.

Copyright 2009 The Associated Press.