SPOKANE, Wash. -- Harvesting Washington state's vast fruit orchards each year requires thousands of farmworkers, and many of them work illegally in the United States.

That system eventually could change dramatically as at least two companies are rushing to get robotic fruit-picking machines to market.

The robotic pickers don't get tired and can work 24 hours a day.

"Human pickers are getting scarce," said Gad Kober, a co-founder of Israel-based FFRobotics. "Young people do not want to work in farms, and elderly pickers are slowly retiring."

FFRobotics and Abundant Robotics, of Hayward, California, are racing to get their mechanical pickers to market within the next couple of years.

Harvest has long been mechanized for large portions of the agriculture industry, such as wheat, corn, green beans, tomatoes and many other crops. But for more fragile commodities like apples, berries, table grapes and lettuce -- where the crop's appearance is especially important -- harvest is still done by hand.

Members of the $7.5 billion annual Washington agriculture industry have long grappled with labour shortages, and depend on workers coming up from Mexico each year to harvest many crops.

President Donald Trump's hard line against immigrants in the U.S. illegally has many farmers in the country looking for alternative harvest methods. Some have purchased new equipment to try to reduce the number of workers they'll need, while others have lobbied politicians to get them to deal with immigration in a way that minimizes harm to their livelihoods.

"Who knows what this administration will do or not do?" said Jim McFerson, head of the Washington State Tree Fruit Research Center in Wenatchee. For farmers, "it's a question of survival."

Washington leads the nation in production of apples and several other crops. Harvest starts in the spring with asparagus and runs until all the apples are off the trees in late fall.

The work is hard and dangerous, and has long drawn Mexican workers to central Washington, where several counties near the Canadian border are now majority-Hispanic. Experienced pickers, who are paid by the bin, can make more than $200 a day.

Advocates for farmworkers say robot pickers will have a negative effect.

The eventual loss of jobs for humans will be huge, said Erik Nicholson of Seattle, an official with the United Farm Workers union. He estimated half of the state's farmworkers are immigrants who are in the country illegally.

But many of them have settled in Washington and are productive members of the community, he said.

"They are scared of losing their jobs to mechanization," Nicholson said. "A robot is not going to rent a house, buy clothing for their kids, buy food in a grocery and reinvest that money in the local economy."

While financial details are not available, the builders say the robotic pickers should pay for themselves in two years. That puts the likely cost of the machines in the hundreds of thousands of dollars each.

FFRobotics is developing a machine that has three-fingered grips to grab fruit and twist or clip it from a branch. The machine would have between four and 12 robotic arms, and can pick up to 10,000 apples an hour, Kober said.

One machine would be able to harvest a variety of crops, taking 85 to 90 per cent of the crop off the trees, Kober said. Humans could pick the rest.

Abundant Robotics is working on a picker that uses suction to vacuum apples off trees.

Plans for the robotic harvesters -- including a goal of getting them to market before 2019 -- were discussed in February at an international convention of fruit growers in Wenatchee.

The two robot makers are likely to hit their production goals, said Karen Lewis, a Washington State University co-operative extension agent who has studied the issue.

"Both of them will be in the field with prototypes this fall," Lewis said, calling the robotic harvesters a "game changer."

But for the machines to work, apples and other crops must be grown in new trellis systems that allow robots to see and harvest the fruit, she said.

"We are evolving the tree architecture and apple placement to be compatible with robotics," Lewis said, a process called "robot-ready."

Large farming operations likely will be first to adopt the machines, but it might be decades before their use is widespread.

"I think for the next 10 to 20 years, they will be used by some growers to supplement regular picking crews and to serve as a backstop for picker shortages," said Mike Gempler of the Washington Growers League in Yakima. Reliability and cost will determine if their use expands.

Republican U.S. Rep. Dan Newhouse, whose family owns a large farming operation in Washington's Yakima Valley, said the industry is deeply interested in alternatives to human labour.

"We are absolutely looking at ways we can increase our efficiency," said Newhouse, adding his family's farm each year employs some 120 farmworkers, many of them picking cherries and nectarines.

The industry has no choice but to embrace mechanization, said Mark Powers, president of the Northwest Horticultural Council, a trade group for farmers in Yakima.

"We don't see some miraculous new source of labour appearing on the horizon," Powers said. "We think labour will continue to be a scarce resource."