NEW YORK CITY - Every Egg McMuffin sold in the U.S. now uses cage-free eggs after McDonald's and supplier Cargill achieved the milestone two years ahead of schedule.

McDonald's last year bought 2 billion eggs, all from Cargill. Many of those eggs come from Minnesota.

Forsman Farms invested millions to build a cage-free facility in Renville, Minn., to help meet the pledge McDonald's set in 2015 to use 100% cage-free eggs at its U.S. locations.

"As a family, we sat down and said, 'Are we going to be able to do it?'" owner Peter Forsman said in a statement. "We had zero cage-free systems, and we knew this was going to be a big challenge."

Cargill is a major ingredient supplier for the world's largest fast-food chain that has an entire business group dedicated to servicing McDonald's. The Minnetonka-based agribusiness worked with several egg operations to transition them into cage-free. Cargill provided about $850 million in financing and offered long-term contracts for egg producers making the switch.

"When McDonald's made the pledge to be cage-free in the U.S., Cargill, McDonald's and our egg producers had to literally build the supply chain of cage-free eggs," Kristin Tupa, sustainability manager for Cargill's North American protein business, said in a news release.

In 2015, McDonald's, which now has 14,300 locations, announced its entire egg supply would be cage-free in a decade.

The industry is generally moving toward cage-free. California voters approved a ballot proposition that requires all eggs sold in America's most populous state be cage-free as of 2022. Several other states have adopted similar rules.

As a result, about 38% of the nation's egg-laying hens are cage-free, according to federal statistics. Cage-free is defined as having room to roam indoors as opposed to constant confinement.

"It's the right thing to do," Forsman said. "It's good for the birds, it's good for our staff, it's good for our family."

Forsman Farms sells more than 3 million eggs per day and was founded in 1918.

It is the nation's 27th largest egg producer with a flock of more than 3.7 million hens, according to WATT Poultry. The cage-free operation can house 1.3 million hens, the trade publication reports.

McDonald's made its cage-free pledge as part of a commitment to "prioritize the health and welfare of the animals in our supply chain," the company said.

Cargill is also keen to position itself as a leader in sustainability, as selling food to a growing population relies on finite resources.

"It is how we want our leaders to run our businesses," Pilar Cruz, Cargill's chief sustainability officer, said in an interview Tuesday night. "We're fully committed to food security, increasing food production and moving food from places where it is produced to places where it's needed within planetary boundaries."