One group wants to build housing. The other wants to provide child care for all families in San Francisco. Both want to shake money out of the pockets of the city’s biggest landlords.

But the duel between two tax measures — one from the city’s moderates, one from its progressives — is really about two factions of City Hall trying to knock each other down.

The moderates have staked their fate on a Housing for All ballot initiative by Supervisor Ahsha Safaí. It would hike the city’s gross receipts tax on commercial property owners, generating about $70 million annually for low- and middle-income housing and homeless shelters. It’s become the linchpin of Supervisor Jeff Sheehy’s campaign in District Eight, and it’s shaped Supervisor London Breed’s platform in the mayor’s race.

Housing for All will go head-to-head in June with a similar measure by Supervisors Jane Kim and Norman Yee, who conducted a voter signature campaign to put their initiative on the ballot. They’re seeking a bigger tax increase to produce $146 million annually for child care subsidies.

Some observers see the measures as pure political gamesmanship as the clock counts down to the June 5 election, which will determine who sits in the mayor’s office and which side controls the Board of Supervisors.

“These measures are designed to be a conflict, rather than a policy solution,” said Jason McDaniel, an associate professor of political science at San Francisco State University. He sees the two sides toying with each other as a direct result of Mayor Ed Lee’s death, the compressed campaign to replace him, and San Francisco’s fragmented political leadership.

But if the competing measures show fractiousness at City Hall, they also provide fuel for candidates in two tight races.

Launching a ballot initiative is a tried-and-true strategy in San Francisco. It’s a way to capture the public’s imagination, the way Kim did when she pitched free City College in advance of her unsuccessful 2016 state Senate race, or the way Gavin Newsom did when he built a campaign for mayor on his 2002 Care Not Cash initiative for the homeless.

Perhaps more importantly, ballot measures aren’t subject to the $500 individual contribution limit that applies to candidates. They allow donors to spend unlimited amounts of money so that a candidate can promote an issue and gain from the reflective attention.

Newsom did it best. His Care Not Cash program lowered financial assistance for homeless people and beefed up shelters and services — a concept that was easy for people to understand at a time when residents were fuming about the number of people living on the street.

“It established Gavin as a citywide figure instead of a child of the Marina and Cow Hollow,” the neighborhoods he represented as a supervisor, said Nathan Ballard, Newsom’s former spokesman. “He was on every TV station. His picture was on every bus stop. He went around the city, and instead of saying, ‘Hi, I’m Gavin Newsom, vote for me,’ he could say, ‘I care about these homeless people. Help me find them housing and treatment.’”

Breed, Sheehy and Kim are emulating that approach. Breed has made affordable housing the theme of her campaign speeches, filtering it through her personal story of growing up in a Western Addition project. Sheehy has relied on Housing for All to resuscitate his sputtering campaign against progressive candidate Rafael Mandelman.

“It’s a key plank for me,” Sheehy said, adding that homelessness and middle-income housing are pressing concerns for his constituents in District Eight, which includes the Castro, Glen Park and Noe Valley.

Kim, meanwhile, has made child care her defining issue, saying she wants to keep women in the workplace, boost wages for child care workers and help families that are struggling to stay in the city.

That stance has put Kim in the awkward position of opposing a housing measure that seems to have wide appeal among labor groups, homeless services and arts nonprofits. Representatives from all of those sectors championed Housing for All when the two measures were the subject of a recent Board of Supervisors hearing.

Both measures were originally put on the ballot by supervisors, but Kim and Yee later replaced their child care measure with the voter-backed initiative, which would require only majority approval. Housing for All, by contrast, would require a two-thirds vote.

Defending herself, Kim painted Housing for All as a mean-spirited ploy by Breed’s allies to undercut the child care measure, which was proposed first.

“This housing measure was a huge surprise for us,” Kim said, referring to herself and her co-sponsor, Yee. “It was slipped in at the last minute by Safaí, who knowingly chose the same revenue source that we did.”

Safaí disagreed, saying that he, Breed and Sheehy had contemplated Housing for All for months, and that they had met several times with the city’s major business associations to discuss the idea.

“The business groups said that if their members are going to be taxed, then housing and homelessness are the crisis of the day,” Safaí said. He and others noted that the housing initiative might be more appetizing because of its smaller tax hike. It would raise the gross receipts tax to 2 percent — a 1.7 percentage point increase — while the child care initiative would raise the rate to 3.5 percent.

San Francisco’s most prominent business groups — the Chamber of Commerce, the Committee on Jobs and the Building Owners and Managers Association — have not yet taken an official position on either measure.

Kim now says she’s contemplating another big revenue initiative for November that would one-up Housing for All. It would tax companies that make more than $25 million a year and spend the money on housing and homeless services. She said she is also considering a billion-dollar affordable housing bond but was vague on details.

The arms race mentality between housing and child care has already sowed confusion among the city’s labor unions and advocacy groups, some of which aren’t sure what proposal to support. Because the two June measures go after the same tax, only one may take effect.

Todd David, executive director of the San Francisco Housing Action Coalition and co-founder of the San Francisco Parent Political Action Committee, is exasperated by the jousting. He has advocated both housing development and child care programs, and recoils at the prospect of one trumping the other.

“Suddenly affordable housing has become a moderate issue, and child care has become a progressive issue,” David said. “But tell me which progressive doesn’t think we need more affordable housing, which moderate doesn’t think we need child care.”

It’s possible that both measures will go down to defeat, given that they will appear on a tax-rich ballot. Voters in June will also be considering a $3 bridge toll increase and a $298 parcel tax to increase teacher salaries.

And if business associations or trade groups come out against one of the gross receipts tax measures, they’ll probably topple the other one as well, said political consultant John Whitehurst, who is running the teacher parcel tax campaign.

“If there’s any confusion, then voters tend to vote ‘no,’” he said, which suggests “no” on both measures.

In the end, though, the candidates will still get mileage from the ballot measure campaigns, regardless of the outcome.