Any company looking at President Trump’s proposed border wall between Mexico and the United States as a business opportunity may soon want to reconsider if it wants to do business with San Francisco.

Two supervisors will introduce legislation Tuesday that would bar San Francisco from contracting with companies that seek a contract to work on the wall during the bidding period, regardless of whether the companies win a contract.

“It is time to move beyond symbolism and use the power we have as a city to fight for the values we hold most dear,” said Supervisor Hillary Ronen, who is introducing the legislation with Supervisor Aaron Peskin.

“What we are saying is that we are not going to spend billions of dollars and line the pockets of businesses that engage in work that goes against the values that we hold most dear,” she said.

The bill is one of several similar proposals around the country, with the Bay Area leading the way.

The Berkeley City Council unanimously passed a resolution last week recommending the city divest from any company involved in any aspect of the project, and the Oakland City Council is set to vote a on a measure Tuesday barring the city from entering into contracts with companies that work on the wall.

Assemblyman Phil Ting, D-San Francisco, introduced legislation Monday requiring the state’s pension funds to divest from companies involved in building the wall.

In New York, Assemblywoman Nily Rozic has introduced a bill that would ban the state from entering into contracts with companies working on the wall. New York City Public Advocate Letitia James is pushing a similar proposal, although it wouldn’t be an outright ban. The time is coming for companies to decide whether to bid on the wall.

On Friday, U.S. Customs and Border Protection solicited design proposals for the wall, which is to be about 2,000 miles long. Among the requirements: the wall be at least 18 feet tall and prevent the construction of tunnels at least 6 feet underground. Proposals must be submitted by March 29.

While it is unknown how many firms will ultimately submit bids, more than 200 companies have expressed interest, according to a government website for contractors who want to work for the federal government.

Among them are two companies that have massive contracts with the city: Hensel Phelps Construction Co. in Oakland and Tutor Perini Corp. of Sylmar. Hensel recently signed a $1.1 billion contract to help build a new terminal at San Francisco International Airport. The San Francisco Municipal Transportation Agency has a $860 million contract with Tutor Perini to help construct the Central Subway.

Those existing contracts would not be impacted under Ronen and Peskin’s legislation, but the companies would be barred from future business with the city if they are awarded contracts to build the wall. They also would be prohibited from bidding on a city contract if, at the same time, they have a pending proposal with the federal government to work on the wall.

A spokeswoman for Hensel Phelps said the company had no comment about the legislation. Representatives from Tutor Perini did not respond to a request for comment.

Other companies that have expressed interest in the wall and have business with the city include Shimmick Construction Co. of Oakland and Drill Tech Drilling and Shoring of Antioch.

Shimmick has received $100 million from four city agencies over the past five years, according to Ronen’s office. Drill Tech currently has a $3.6 million contract with the Department of Public Works. Representatives from neither company could be reached for comment.

Ronen and Peskin’s legislation may put companies in a tough spot, as they decide between a potentially lucrative contract to work on the wall — the Department of Homeland Security estimates it will cost upward of $21 billion to construct — and losing out on potential contracts with San Francisco.

The legislation does not currently apply to subcontractors but Ronen plans to amend it to include them. Both subcontractors and general contractors would have to disclose in any applications with the city whether they had bid to work on the wall.

“It is pretty harsh because a company is put in a bind, because if they were thinking about bidding on two jobs - to build the wall or work for San Francisco - they couldn’t do both,” said Thomas Joo, a professor at UC Davis School of Law who specializes in corporate governance and contract law.

But he said the impact of the legislation would depend on how many companies were interested in contracting with San Francisco and building the wall — and that remains to be seen.

Joo warned that the legislation could harm San Francisco as much as any company, because “fewer bids means less competition,” which could mean the prices of contracts increase.

Former City Attorney Louise Renne said there are “all sorts of precedents” for the city not doing business with certain companies because of policy goals.

That includes a ban on contracting with companies that did business in South Africa during the apartheid years. And in 1997, San Francisco passed watershed legislation requiring companies that do business in San Francisco to provide the same benefits to domestic partners as they did to married couples.

Emily Green is a San Francisco Chronicle staff writer. Email: egreen@sfchronicle.com Twitter: @emilytgreen