A solid majority of Americans opposes a broad national right to same-sex marriage, saying the power to legalize gay unions should rest with the states — even as most support marriage equality for gay people, according to the latest New York Times/CBS News poll.

The survey comes as the Supreme Court is preparing to issue decisions this month on two high-profile same-sex marriage cases. Justices are weighing the constitutionality of California’s ban and the Defense of Marriage Act, a 1996 law that denies federal benefits to same-sex couples; the public appears squarely in favor of overturning that law.

The poll also found Americans are increasingly upbeat about the economy, with 39 percent of respondents calling the economy’s condition good, the highest percentage since late 2007. And it found stark racial and partisan divisions on two other matters before the Supreme Court: affirmative action and voting rights.

On national security, Americans expressed strong skepticism about taking the lead in trying to solve overseas conflicts, but support for action against Iran if it is on the verge of acquiring a nuclear weapon. The public continues to support the Obama administration’s use of unmanned drone aircraft; 72 percent back their use against people suspected of being terrorists, but 66 percent are concerned the drone program suffers from “not enough oversight.”

The poll found mistrust of the federal government, amid national debate about whether it has grown too intrusive; in subsequent interviews, several respondents said the federal government should stay out of private lives, and one cited the recent controversy at the Internal Revenue Service, which has acknowledged targeting Tea Party conservatives, in arguing marriage should be left to the states.

“The federal government is too involved in too many personal things that they don’t need to be involved in,” said Frances Narramore, 75, a retired teacher in Arizona, who calls herself an independent. “Just look at what’s happening at the I.R.S., and you see what I mean by that.”

Asked whether same-sex marriage rights should be “determined by the federal government or left to each individual state government to decide,” 60 percent preferred leaving it to the states, and 33 percent the federal government.

Yet respondents also wanted equal treatment for gay people who are already legally married. By a 17-point margin — 56 percent in favor, 39 percent against — they said the federal government should recognize legal marriages of same-sex couples and provide them the same federal benefits given legally married heterosexual couples.

In addition to the same-sex marriage cases, the Supreme Court is also likely to issue decisions on two other major cases — one on the Voting Rights Act of 1965 and one on whether public universities can consider race as a factor in admissions — by the end of June.

Americans are divided over whether the voting act is necessary; 49 percent said it is, but 44 percent said it is not. Black respondents and Democrats were far more apt to say the act was still needed. The Supreme Court is now reviewing the part of the act that bars jurisdictions with a history of discrimination from changing voting laws without federal approval.

More than half of Americans, 53 percent, favor affirmative action programs for minorities in college admissions and hiring, the poll found. (Other surveys that frame the question in terms of giving minorities “preference” find less support.)

In a case brought by Abigail Fisher, a white student denied admission to the University of Texas at Austin, the Supreme Court is considering whether to affirm, limit or overturn a 2003 ruling allowing public universities to consider race as one factor in an “holistic review.”

In the Times/CBS News Poll, those who favor affirmative action said by large margins that they believe achieving diversity is a stronger rationale for it than making up for discrimination.

But here, too, there are racial and partisan differences. While three-quarters of blacks support affirmative action, fewer than half of whites do, according to the Times/CBS News Poll. And while support stands at 75 percent among Democrats, it drops to 37 percent among Republicans.

“If you’re smart enough to get into college, you should be smart enough without your race,” said one Republican respondent, Krista Bumgarner, 27, a homemaker and personal care assistant in Foley, Minn.

The question of state-versus-federal authority is at the heart of all three major pending court cases. Gay-rights advocates liken California’s Proposition 8, which in 2008 banned same-sex marriage there, to earlier state bans on interracial marriage, which fell across the country in 1967 after the Supreme Court’s landmark decision in Loving v. Virginia.

Chad Griffin, who organized the challenge of the California law and is now president of the Human Rights Campaign, an advocacy group, argued that the court must intervene, saying marriage rights should be fundamental, and “not determined by what side of a state border one lives on.”

“The exact same arguments were made in the 1950s and ’60s — let the states decide integration, let the states decide voting rights,” he said.

Some justices have expressed skepticism, though, including Justice Ruth Bader Ginsburg, citing the firestorm after the court’s 1973 Roe v. Wade ruling establishing a right to abortion. Many legal analysts expect the court to issue a narrow ruling that applies to California alone.

Respondents to the poll seemed to support that course, regardless of whether they favored allowing gay people to marry. “We’re sort of set up for things to go through the states, and then filter up to the federal government,” said Steve Koivisto, 47, a Democrat and music instrument repair technician in Baton Rouge, La., who backs same-sex marriage.

Same-sex marriage is legal in 12 states and the District of Columbia; in three of those states — Delaware, Minnesota and Rhode Island — the laws are so new they have not yet taken effect. Still, that is far short of the 34 states that permitted interracial marriage when the court decided Loving v. Virginia.

Many Americans are convinced that marriage change is coming; 72 percent see legalization as “inevitable,” according to a Pew Research Center survey released Thursday.

“The time will come soon enough when enough of these states will have legalized it, for the federal government to make it law,” Mr. Koivisto said.

Surveys have shown that support for same-sex marriage has been increasing, and the Times/CBS News Poll found that 51 percent back marriage rights for gay people, while 44 percent are opposed, largely unchanged since late last year. Support spikes to 68 percent among Americans under 30, but gay marriage wins the backing of just 32 percent of those 65 or older.

The survey of 1,022 Americans had a margin of sampling error of plus or minus three percentage points. It was conducted from May 31 to June 4, as the Obama administration was coping with the I.R.S. controversy and revelations that the Justice Department had sought reporters’ telephone records.

President Obama seems to have been unaffected; his approval rating held steady at 47 percent, the survey found.

Correction:June 6, 2013

An earlier version of this article misstated the three states that have same-sex marriage laws so new that they have not yet taken effect. Those states are Rhode Island, Delaware and Minnesota. Connecticut is not among those states.

Megan Thee-Brenan and Allison Kopicki contributed reporting.

A version of this article appears in print on , on Page A16 of the New York edition with the headline: Gay Marriage Seen in Poll as Issue for the States. Order Reprints | Today’s Paper | Subscribe