MEXICO CITY — About 500 Central American migrants headed out of Mexico City on Friday to embark on the longest and most dangerous leg of their journey to the U.S. border, while thousands more were waiting one day more at a massive improvised shelter.

The group that got a head start bundled their few possessions and started off, taking a subway to the north part of the city and then hiking down an expressway with a police escort.

For many, it was the first time they had ever been in a metro system, and they had little knowledge of the city or the 1,740-mile route to Tijuana that lay ahead of them.

Carlos Castanaza, a 29-year-old plumber from Guatemala City, wrapped himself from head to toe in a blanket against the cold and asked bystanders where the first toll booth was. When told it was in a town about 20 miles away, he carefully wrote the name of the town on his hand with a pen to remember where he was going.

Deported for driving without a license after a decade of working in Connecticut, Castanaza was desperate to get back to his two U.S.-born children. “I’ve been wanting to get back for more than a year, but I couldn’t until the caravan came through,” said Castanaza. “That’s why I joined the caravan.”

The advanced group hoped to reach the north-central city of Queretaro, about 105 miles to the northwest, by nightfall.

Meanwhile, another 4,000 to 5,000 migrants milled around the massive shelter improvised at a Mexico City sports complex, impatient to leave.

“Let’s go, let’s go!” shouted Eddy Rivera, 37, a rail-thin migrant from Honduras who said he couldn’t take staying in the camp any longer. “We are all sick, from the humidity and the cold,” said Rivera, who left behind four children and a wife in Honduras.

Though he was unsure how an unskilled farmworker like himself would be allowed in the United States, he had a simple dream: earn enough money to build a little house for his family back in Puerto Cortes, Honduras.

Thousands of migrants have spent the past few days resting, receiving medical attention and debating how to proceed with their arduous trek through Central America and Mexico which began in mid-October. On Thursday, caravan representatives met with officials from the local United Nations office and demanded buses to take them to the border.

Caravan coordinator Milton Benitez said officials had offered them buses for women and children but organizers demanded that they be for everyone.