ALBUQUERQUE (AP) _ Democrats selected Martin Chavez, an outspoken critic of gambling, to challenge Republican Gov. Gary Johnson in a November general election that could become a referendum on the spread of casinos across New Mexico.

Chavez, a former mayor of Albuquerque, won a six-way contest Tuesday for the Democratic gubernatorial nomination, according to unofficial and incomplete returns. He and Diane Denish, an Albuquerque business owner, will form the Democratic ticket in the governor's race in the Nov. 3 general election.

Johnson and Lt. Gov. Walter Bradley faced no primary opponents.

Chavez received 48 percent of the vote, with 95 percent of the ballots counted. State Rep. Gary King of Moriarty trailed with 31 percent.

In what could be a sign of the debate that lies ahead, Chavez wasted no time in targeting Johnson's support of Indian gambling. Tribes were major donors to Johnson's 1994 campaign and Chavez said he expected the Republican to have a big advantage in cash this year.

``We're going to be outspent. We don't have the casinos behind us like he does,'' Chavez said.

Johnson signed gambling compacts with tribes in 1995, which were later invalidated by state and federal courts. A law was enacted last year to legalize casinos on tribal lands and electronic slot machines at horse-racing tracks and fraternal and veterans' clubs.

Chavez has partly blamed Indian casinos for a slowdown in Albuquerque's finances that led to budget cuts. He says he will aggressively enforce the current gambling agreements and, unlike Johnson, has taken a wait-and-see approach on whether to support tribal requests to reduce their casino payments to the state.

Johnson said he would run in the fall campaign on his first-term record, including slowing the growth of state government while providing more state aid to public schools.

But the governor said, ``I'm still the non-politician in this race.''

Johnson described Chavez as a ``formidable opponent.''

``He is going to campaign real hard. It's going to be a close election,'' Johnson said.

Chavez ran strongly throughout the state. He collected a large margin in Bernalillo County, the home to 29 percent of the state's Democrats and outdistanced King nearly 3-to-1 in Santa Fe County.

Chavez received congratulatory telephone calls Tuesday night from President Clinton and Vice President Gore. Chavez raised the possibility that Clinton might come to New Mexico to help his campaign.

Denish won a close contest for the lieutenant governor's nomination. She had 52 percent to 48 percent for Secretary of State Stephanie Gonzales, with 97 percent of precincts reporting.

The Green Party had write-in candidates for governor and lieutenant governor, but won't have a ticket in the general election.

George Smith of Santa Fe, the Green gubernatorial candidate, failed to get enough votes to secure the nomination. He didn't campaign actively in the primary and the Greens recruited him only because it wanted to stop another candidate, Daniel Pearlman, from running.

Because Smith was unopposed as a write-in, he needed 230 votes _ the same number needed to get on the primary ballot through nominating petitions _ to secure the nomination, according to Ernest Marquez, director of the state elections bureau. Smith received 125 votes, according to unofficial and incomplete returns.

Chavez, 46, is a lawyer and former state senator who ran the state's largest city for four years, until last December.

Johnson, 45, is seeking to become the first governor in New Mexico to win back-to-back four-year terms. An Albuquerque construction company owner, Johnson was a newcomer to elective politics in 1994 when he defeated Democrat Gov. Bruce King, the father of Gary King.