EL PASO — The political dividing line in El Paso on Monday night was drawn on Shelter Place. To the west of that street, thousands of red-hatted supporters of President Trump packed into an aging coliseum and filled its parking lot. To the east, thousands of critics of the president and supporters of former Democratic congressman Beto O’Rourke carried homemade signs and filled a baseball diamond.

Standing just a few blocks north of Mexico, those to the west repeatedly chanted: “Build that wall!” Those to the east argued: “We don’t need a wall!”

Separated by that street — and dozens of police officers with riot helmets — the two groups rallied around two vastly different views of the border and of this country, a reminder of divisions in America ahead of the next presidential election, in which immigration will probably play a role.

O’Rourke was the first to take the stage, after being introduced as “our hometown hero” and welcomed by chants of “Beto! Beto! Beto!” In the distance, booming through loudspeakers, was the voice of Trump’s warm-up act, his son Donald Trump Jr. Only a few of the younger Trump’s words were clearly heard, creating a Trumpian word cloud: “Deplorables.” “Fight.” “Other side.” “Illegal aliens.”

In his speech, O’Rourke first recognized the various activist groups and “amazing organizers who made this possible, whose lead we follow” — some of whom felt forgotten as the event morphed from a community protest of Trump into a pep rally for a politician who lost his recent U.S. Senate race and is thinking about running for president.

Throughout his 30-minute speech, O’Rourke cast the wall not as an issue in the debate over immigration but as a test of the nation’s core values. He declared that a wall would not make the country safer; he said those who cross the border illegally want to “work jobs that no one will take, to be with a family member, to flee horrific brutality and violence and death in their home countries.”

O’Rourke called for welcoming immigrants “with open arms” — instead of taking “advantage of them” or sending “them back to certain death” — and for giving full citizenship to undocumented immigrants who have long called the United States home. He urged his followers to oppose not only policies such as the separation of migrant families at the border, but also the hateful rhetoric that leads to such actions.

“We stand for America, and we stand against walls,” O’Rourke said. “We know there is no bargain in which we can sacrifice some of our humanity to gain a little more security. We know that we deserve and will lose both of them if we do. We stand for the best traditions and values of this country, for our fellow humanity, and who we are when we are at our best.”

About halfway through O’Rourke’s remarks, Trump took the stage about a block away in the El Paso County Coliseum. His face rose on an outdoor screen that could be seen in the distance behind O’Rourke. Although O’Rourke mentioned “the president,” he never said Trump’s name — even as he stood before a crowd holding signs that labeled Trump dangerous, a liar and a racist, and called for his impeachment or deportation.

The cheers of both crowds mixed in the chilly air.

As Trump spoke for roughly 75 minutes, he took credit for lowering unemployment rates for minorities and for popularizing the term “caravan” to describe groups of Central American immigrants who journey to the United States in packs. He repeatedly touted the effectiveness of walls and insisted that the construction of one along the El Paso border about a decade ago reduced violent crime — which the city’s Republican mayor says is inaccurate.

The president also announced that “today, we started a big, beautiful wall right on the Rio Grande, right smack on the Rio Grande,” seeming to refer to the construction of steel bollard fencing atop existing river levees in the Rio Grande Valley using money appropriated by Congress last year. At one point, as the crowd chanted its support for building a wall, Trump corrected them: “You really mean, ‘Finish that wall.’ ”

To Trump, the wall is at the heart of the immigration policy debate.

“The biggest proponents of open borders are rich liberals and wealthy donors,” Trump said. “They live behind walls and gates, and they have guards all over the place — me, too, because I want to be safe, and I want to make America safe, if you don’t mind.”

On the east side of Shelter Place, O’Rourke said that El Paso is “safe not because of walls but despite walls; secure because we treat one another with dignity and respect.”

On the west side, Trump accused Democrats of having a “ridiculous and radical agenda” that could harm Americans and insisted that his own agenda is “nonpartisan.”

O’Rourke said that walls cost lives. Trump said that walls save lives.

The two rallies often felt like two different worlds.

On the east side of a street, the air smelled of incense, and organizers spoke mostly in Spanish. There was a mariachi band and a reggae group that changed the lyrics to one of Bob Marley’s songs — “Don’t give up the fight. Beto, don’t give up the fight. El Paso, don’t give up the fight.” There was no formal security, other than a group of volunteers who joined hands to create a human barrier between O’Rourke and journalists who wanted to interview him — and rallygoers made their own signs to carry.

On the west side of the street, one vendor displayed a flag that merged the Texas state flag and the Confederate one, while another repeatedly yelled: “Border Wall Construction Company shirts — build a wall, deport them all!”

Both crowds were filled with locals and Hispanics, who make up more than 80 percent of El Paso’s population. Both politicians told deeply emotional stories to back up their arguments.

O’Rourke opened his remarks with an El Paso history lesson, telling the stories of an undocumented Mexican immigrant who became Texas’s most decorated soldier in World War I, a high school baseball team that won the 1949 state championship even though its impoverished Hispanic players were repeatedly discriminated against, and the 1954 valedictorian of El Paso’s all-black high school who was denied entry at the local state university and fought for racial integration. O’Rourke urged his supporters to take similarly brave stands now.

Across the street, Trump told a harrowing story of Central American women whom he says are routinely “tied up in the back seat of a car” and illegally brought over the border into the United States by human traffickers. It is a tale that the president often uses but that fact-checkers have not yet matched to actual incidents.

In Trump’s crowd Monday night were three friends who lived much of their lives in El Paso’s El Segundo Barrio, a historic Hispanic neighborhood on the border, and say that crime in their neighborhood decreased after the border was fortified in 2008 and 2009.

“I call it my freedom fence, because I got my freedom,” said Dolores Chacon-Chavira, 67, a retired teacher whose longtime family home now has a border wall through its backyard. “I was able to go out without the fear of facing strangers in my backyard.”

Across Shelter Place at the rally featuring O’Rourke, two lifelong El Paso residents and former co-workers held homemade signs touting their city’s safety.

Yes, they said, the city has gone through cycles where crime rates have gone up — but they said that has nothing to do with the barricades that popped up on the border about a decade ago and blocked their view into Mexico.

“We have the ‘normal crime,’ but not the crimes that he describes,” said Yolanda T. Ellis, 65, a retiree who used to work at the county courthouse. “He makes it sound like every time someone steps out, they’re going to be thrown into a truck and taken across the border. That doesn’t happen.”

O’Rourke ended his speech by urging his followers to take a historic stand against what’s happening at the border. An hour later across Shelter Place, Trump ended his remarks by going through what he considers the country’s most important priorities.

As the rallies ended, young supporters of the two politicians came face to face on Shelter Place. There was a scuffle over a “Make America Great Again” hat and another one over a liberal demonstrator’s poster. There were chants of “Trump! Trump! Trump!” and “Beto! Beto! Beto!”

A young Trump supporter sneered at a mention of O’Rourke’s Latino nickname, which was given to him when he was a child, and shouted: “Robert! Francis! O’Rourke! From Ireland! Go back to Ireland!” A young Hispanic Trump supporter — dressed in a poncho and sombrero as he carried a “Build the Wall” sign — grinned widely as a group of liberal demonstrators demanded to know how he could be Mexican American and support the president.

A 29-year-old woman from New Mexico, whose grandfather is from Mexico, positioned herself in front of the exit from Trump’s rally with a sign that read: “Trump is a lying, corrupt racist.” She tried to lock eyes with as many Trump supporters as she could, yelling “Racists! You support a racist!”

A school-aged boy and his mother passed, and the child chanted at her: “Trump! Trump! Trump!” She responded: “Racist!” The child responded: “Yeah, that’s what you are.”

On the loudspeaker, police told the crowd to keep moving.

Philip Rucker contributed to this report.