By David Harrison and Paul Hannon

The U.S. economy picked up momentum this month as firms shook off the effects of the pandemic-induced downturn, though recoveries in other parts of the world slowed, according to new surveys of purchasing managers.

The data released Friday suggest U.S. firms are seeing demand return as they reopen from the lockdowns imposed in the spring and early summer. They also indicate the economy has so far managed to weather July's sharp rise in new coronavirus infections and business closures that threatened to knock the recovery off course.

Data firm IHS Markit said its composite purchasing managers index, a measure of manufacturing and services activity, rose to 54.7 from 50.3 in July, an 18-month high, with both sectors seeing a big rise. A reading above 50 is a sign of expansion while a reading below 50 is a sign of contraction.

The index of manufacturing output was up to 53.6 from 50.9 in July. The services activity index rose to 54.8 from 50.

"The renewed increase in sales among service sector firms was welcome news following five months of declines," said Siân Jones, economist at IHS Markit. "Encouragingly, firms signaled an accelerated rise in hiring, as greater new business inflows led to increased pressure on capacity."

Other indicators, however, suggest the U.S. economy remains vulnerable. New applications for jobless benefits rose last week, the Labor Department reported Thursday. Job gains slowed in July from June. More pain could be on the way as several companies, including Boeing Co., have announced job cuts.

Overall economic activity remains far below its prepandemic level. The Federal Reserve said last week that industrial production was still 8.2% lower than its level a year ago. Restaurant reservations are about 50% of where they were a year ago, according to OpenTable, an improvement from April and May, when they had almost completely frozen up.

An uptick in demand drove the expansion in both manufacturing and services, IHS Markit said, thanks to returning customers, new marketing campaigns and the easing of lockdowns overseas, which helped exports pick up. Respondents to the firm's surveys said they remained optimistic about the next 12 months although they expressed concerns about the continued pandemic.

Arne Sorenson, chief executive officer of Marriott International, Inc., said business at the hotel chain had been recovering, driven largely by leisure travelers eager to get out of the house despite the persistent pandemic.

"I am no more optimistic about the virus than I was a month ago," he told analysts last week. "I am, however, more optimistic about the recovery of travel and the recovery of our business."

He attributed that to "the gratifying resilience of American travelers."

William Meaney, chief executive officer of Iron Mountain, a data management company, said earlier this month that its second quarter revenue decline wasn't as bad as expected but that the outlook remained uncertain.

"We continue to see some risk around the second half depending upon what happens with the progression of the virus and possible additional restrictions," he told analysts in an Aug. 6 conference call.

In Europe, Markit's composite PMI for the eurozone fell to 51.6 in August from 54.9 in July, indicating that activity rose more slowly than in the previous month.

This comes as infections are again surging in Europe and governments are racing to prevent a full-fledged second wave of the pandemic. That resurgence has hit the services sector particularly hard, including the tourism industry at what is usually its busiest time of the year.

"The recovery was undermined by signs of rising virus cases in various parts of the euro area, with renewed restrictions impacting the service sector in particular," said Andrew Harker, an economist at IHS Markit.

While the number of people infected by the virus in Europe has risen over recent weeks, those affected have been much younger on average than during the first wave, and hospitalizations have been much lower. According to economists, that makes it less likely that governments will revert to widespread lockdowns, which would likely send the eurozone economy back into contraction.

"For the economy, these are arguably the most important metrics as it is the fear of hospitals being unable to cope which pushed governments into drastic measures first time around." Andrew Kenningham, Capital Economics.

In contrast to the services sector, some of Europe's factories reported another month of strong growth in August, with German businesses citing a pickup in orders from China. However, their French counterparts didn't have the same experience, with output growth slowing sharply.

The eurozone's economy contracted more sharply than the U.S. in the second quarter, an indication that lockdowns were more restrictive and longer-lasting. Eurozone policy makers had hoped that by getting a firmer grip on the virus, the currency area's economy would see a stronger rebound during the remainder of the year and into 2021. If the surveys are backed up by other data in recording a slower expansion than was expected, the European Central Bank is more likely to provide additional stimulus in the coming months.

Japan's economy contracted less sharply than those of the U.S. and the eurozone in the second quarter, but that was partly because output had already started to fall in the final three months of 2019.

The survey of purchasing managers carried out by IHS Markit indicated that the country's economy contracted again this month, with the composite PMI unchanged at 44.9 in August.

"The second virus wave has brought the recovery to a standstill, but won't cause a renewed downturn," said Marcel Thieliant, an economist at Capital Economics.

Write to David Harrison at david.harrison@wsj.com and Paul Hannon at paul.hannon@wsj.com