LAS VEGAS — The bricklayers work with ruthless efficiency, scraping and slathering mortar brick after brick, tamping each down to ensure everything is level. By the end of a single hour, with thousands of spectators watching, they have built a stretch of wall that would be a day’s work for a mason building at a normal pace.

“I’m on the edge of crazy when I’m laying brick,” said Matt Cash of Charlotte, N.C., a defending champion of the Spec Mix Bricklayer 500, the world’s largest competition of bricklayers.

On the other side of this parking lot behind the Las Vegas Convention Center, a robot moves at a decidedly more plodding pace. It’s called SAM for short (semi-automated mason), and if it were to enter the competition, it would surely lose.

Here at this race, humans are holding off the future with trowel and muscle. But that may not last. Bricklayers are becoming increasingly hard to find nationwide. Despite rising wages, there’s a shortage of workers.

Nearly two-thirds of bricklaying contractors say they are struggling to find workers, according to a survey by the National Association of Home Builders . And it can take three to four years before a person with no experience can become a journeyman bricklayer.

In addition, productivity — how much brick wall a laborer can complete in an hour of work — isn’t much better than it was two decades ago. Bricklaying’s most important tools — a trowel, a bucket, string and a wheelbarrow — haven’t changed much over centuries.

These factors would seem to put the trade at risk of a robot takeover.

But the human competitors here weren’t worried. SAM is far from being widely adopted. There are only 11 of them, costing roughly $400,000 each, a prohibitive amount for many small contractors. The machines can’t do corners or curves or read blueprints. SAM also requires workers to load its brick, refill its mortar and clean up the joints of the brick it lays.

What SAM does do is work without getting thirsty, sick or tired. In some ways, it is running a different kind of race.

“It’s not whether or not we win in the first hour,” said Scott Peters, president of Construction Robotics, the maker of the machine. “We’d just like to see them in the fourth hour.”

Innovations like these could ease the pressures of construction costs that are worsening the housing shortages in some parts of the country. Even Jeff Buczkiewicz, president of the Mason Contractors Association of America, acknowledged a role for robots.

“The machines will never replace the human,” Mr. Buczkiewicz said. “They will help down the road and they will make it that we won’t need as many workers, but given the shortages we’re seeing now, that’s probably a good thing.”

But he added, “There’s a human element to a craft that you don’t get from a robot.”

That emphasis on craft was on full display on Jan. 24. In contrast with many other trade shows, demonstration of technology still plays second fiddle to the spectacle of the race.

Bricklaying competitors David Chavez and Miguel Contreras

Houston, Texas Gregory Canham and Sheree Canham

New Berrima, Australia Genaro Contreras and David Puga

Phoenix, Arizona Kaleb McGee and Wriston McGee

Monroe, North Carolina The teams consist of a mason (in blue) and a tender (in black). The mason lays down the bricks while the tender prepares the mortar and bricks. Roger Kisby/The New York Times

The teams consist of a mason (in blue) and a tender (in black). The mason lays down the bricks while the tender prepares the mortar and bricks. The teams have proved to be the fastest at their job sites and in their hometowns and regions.

During the race, the pace is frantic. In that one hour, each mason will have to lay an average of 9 to 10 bricks a minute to be competitive.

Laying the right amount of mortar is a key. Too much and it resists as you push down the brick. Too little and the bricks will be too close together.

Building up corners, known in the trade as leads, is one of the most time-consuming parts of the process.

The leads are crucial for a straight and level wall; a mistake with a corner could throw off the rest of the wall, essentially disqualifying a competitor.

The race is exhausting. The competitors are doing an already physically demanding job at an extremely taxing pace. By the end, many will have moved more than 600 three-pound bricks.

What’s left is a parking lot filled with rows and rows of walls, each more than 26 feet long. Judging is taken very seriously here because a lot is riding on the outcome: The top prize includes a shed’s worth of tools, several thousand dollars and a Ford truck.

Each wall was carefully assessed on its height and levelness. On these measures, the walls cannot vary more than a quarter of an inch.

The winners this year were David Chavez and Miguel Contreras, bricklayers from Houston who managed to build a wall of nearly 700 bricks that received no deductions, an extraordinarily rare feat. They’ve placed several times in the past, but this was their first time winning the grand prize.

No matter how deft the competitors are, they and their fellow tradespeople face a larger challenge: maintaining bricks’ main appeal as a cheap and durable building material. To do that, bricklayers need to find a way to transfer their skill and knowledge to thousands of new workers — or to robots like SAM.