Manufacturing activity in Texas took an unexpected downturn, the Federal Reserve Bank of Dallas’ survey of Texas manufacturing business showed Monday.

The survey’s gauge of general business activity slumped to negative 5.1, indicating a slowdown in economic activity in the region’s manufacturing sector. Economists had expected it to tick down to 1.4 from September 1.5 reading.

“Texas factory activity continued to expand in October, albeit at a markedly slower pace, according to business executives responding to the Texas Manufacturing Outlook Survey,” Dallas Fed said.

The key production index remained in positive territory, indicating ongoin expansion, falling to 9.4 points to 4.5.

“Texas factory activity continued to expand in October, albeit at a markedly slower pace, according to business executives responding to the Texas Manufacturing Outlook Survey,” Dallas Fed noted in its press release.

New orders, however, fell into contraction for the first time in three years. Unfilled orders and the growth rate of new orders also fell. Capacity utilization index declined to a three-year.

It was not all gloom in Texas in October. The labor market still appears strong, with nearly twice as many firms reporting adding workers than those reducing their workforce. The employment index fell but remained above average. The wages and benefits index moved up five points to 22.2 even though the hours worked component declined.

Perhaps more important, the survey’s measure of expectations regarding future business conditions got optimistic in October. The index of future general business activity returned to positive territory, rising nine points to 2.4. The index of future company outlook rose 13 points to 15.3, its highest level in six months. Other indexes for future manufacturing activity also rose.

Manufacturing activity in Texas is very much leveraged to mining and drilling activity, in part because resource extraction uses a lot of manufactured equipment. When the price of oil drops sharply, energy companies can hold back on investing in new wells and machinery.

That may explain some of what happened in Texas in October. The price of oil fell at the end of September. The price of a barrel of West Texas Intermediate crude fell from its September 16 high of $62.90 to a low of $52.45 on October 3rd. It remained low most of the month, although prices did recover somewhat in the penultimate week of the month, hitting $56.66 on Friday, October 25th.