Once at the mercy of shippers, truckers now are turning the tables, thanks to surging freight demand and a shortage of drivers.

Gone are the days when customers used reliability scorecards to reject some truckers and kept others waiting for hours with no place to take a break but portable canopies and grimy restrooms. Now, companies such as Nestle SA are rushing to make drivers feel welcome. And shippers that hinder rigs from quick turnarounds or treat operators shabbily are paying a premium.

“Carriers are now starting to score shippers and receivers, and the primary way of keeping score is money,” said Cliff Finkle, vice president of Finkle Trucking, a New Jersey-based company with 250 rigs. “I’m just going to say, ‘Your place sucks, and if you really want me to go in there, I want an extra $300.’ ”

Trucking companies’ increased leverage is applying added pressure to cargo costs as accelerating economic growth bolsters transportation demand and exacerbates driver scarcity. With first-quarter trucking spot rates up 27 percent from a year earlier, according to Bloomberg Intelligence, freight expenses are crimping profits at companies from 3M Co. to General Mills Inc.

Relief isn’t in sight. The U.S. has about 280,000 fewer truck drivers than it needs, according to an estimate by FTR Transportation Intelligence. The dearth of available trucks got worse in April as regulators stepped up enforcement of limits on driver hours.

Such pressures have prompted customers to go the extra mile to make sure they can get drivers when they need them, whether by sprucing up break areas or taking steps to speed truck turnaround.

If shippers processed cargo more quickly, they could free up freight capacity as much as 20 percent, said Bob Costello, an economist with the American Trucking Associations trade group.

Shippers are also getting prodded by the trucking industry itself. Most freight contracts require customers to make payments if a driver is detained for more than two hours. Disputes over such payments are common, however.

“If a shipper in our network is a serial abuser of detention, we will not take their freight,” said Drew McElroy, chief executive officer of Transfix, a startup that uses online technology to streamline bookings. “We’re actually building our brand with the driver community at least partially around the quality of the freight and the freight experience you have.”

One way to speed up the process is to enable a driver to drop a trailer at a shipping yard and hook up another that’s already loaded, even before the first is emptied. That requires customers to provide space for parking the extra trailer and its own drivers to maneuver equipment into position.

Nestle boosted such drop-and-hook operations at its U.S. water unit to 61 percent last year from 57 percent in 2016, said Ken Rogers, the unit’s director of transportation. That increase along with other efforts, such as putting radio transmitters on trailers to locate them more quickly and making signage consistent across its yards, helped cut loading and unloading time by 18 percent.

“We need drivers to be driving and not looking for trailers and not waiting at locations to get unloaded or loaded,” he said. But not all Nestle facilities have the space for drop-and-hook operations, so the Swiss food and beverage giant also has made driver waiting areas more pleasant.

Nestle converted part of its Ontario, California, warehouse into a break room with restrooms, coffee, bottled water and a television. In addition to paying standard detention payments at its own locations, Nestle also sometimes pays when truckers are delayed at its customers’ facilities.

“There are definitely things you can do to partner with a carrier to stave off the spot rates,” Rogers said. “We don’t ever want to lose a carrier because they feel like they’re being abused on the receiver side.”

For shippers, the costs of improving operations pay for themselves, said Ben Cubitt, chief of engineering and procurement for Transplace, a logistics consulting firm.

“Carriers to some extent have a naughty and nice list,” he said. “If you’ve been a good partner through thick and thin, you’re definitely suffering less in this tough market than other shippers.”