WASHINGTON — Business inventories rose at a slower-than-expected pace in May, a possible indication that the weakening economy is making companies cautious on their restocking plans.

The Commerce Department reported Tuesday that inventories held on shelves and backlots edged up 0.3 percent in May, smaller than the 0.5 percent gain that many economists had been expecting. It was the smallest monthly increase since inventories had risen just 0.2 percent in April.

Many economists are worried that a host of problems from a lengthy slump in housing to a severe credit crunch could push the country into a recession. But so far, the overall economy, as measured by the gross domestic product, has managed to stay in positive territory, helped in part by companies rebuilding their inventories.