Maryland Gov. Robert L. Ehrlich Jr. yesterday became the nation's first Republican governor to sign into law a measure that relaxes criminal punishment for seriously ill people who use marijuana to relieve pain and other symptoms.

Ehrlich also approved a bill to reorganize the state's largest health insurer, partly in response to a failed effort by the company to convert into a for-profit firm and enrich its executives.

In signing those two bills, along with a measure that moves Maryland closer to giving illegal immigrants the right to obtain driver's licenses, Ehrlich showed an independence that reflected his campaign to portray himself as a moderate Republican bent on reforming state government.

A day earlier, by contrast, he displayed a conservative, pro-business face by vetoing a $135 million package of corporate tax increases as well as bills that would have lowered college tuition for illegal immigrants and required Home Depot and other retailers to sell more energy-efficient appliances.

As he made some of the biggest policy decisions of his first year in office, Ehrlich crossed swords with politicians from liberals to Bush administration officials. On other issues, he won praise from the same groups, reinforcing his record as a lawmaker who is careful not to stray too far from the center.

"These are not easy issues, not easy bills," Ehrlich said of the measures he has signed and vetoed over the past two days. Taken together, he said, his decisions reflect an administration committed to bipartisan governance and "balanced with a unique dash of independence."

He was particularly firm in his support for the marijuana measure. It does not legalize the drug but provides that seriously ill people caught using marijuana for medical purposes cannot be jailed or be fined more than $100. The White House and some conservative supporters urged the governor to reject the bill, but Ehrlich cited his longtime support for the measure.

"If you look at my views over the years, there are clearly two wings of the party on social issues," he said. "One is more conservative, and one is more libertarian. I belong to the latter, and I always have."

The bill reorganizing CareFirst BlueCross BlueShield also sparked a heated debate. Company executives and health care lobbyists had prodded Ehrlich to reject the measure, but analysts said that would have hurt the governor politically.

"He really didn't have any choice," said Matthew Crenson, a political science professor at Johns Hopkins University. "If he had vetoed that, it would have given the Democrats a club to beat him over the head with."

The bill, which gives the state more control over the insurance company by replacing almost half the board of directors and requiring that it remain a nonprofit for at least five years, prompted an immediate lawsuit from the Blue Cross and Blue Shield Association seeking to sever its affiliation with the company. The Maryland attorney general also filed suit to block such a move.

Some Democrats were quick to seize on several of Ehrlich's vetoes as political ammunition, calling him a "hard-right" Republican. But others said it wasn't so easy to pin a political label on the governor.

"On policy, Governor Ehrlich has been pretty progressive," said House Speaker Michael E. Busch (D-Anne Arundel). "He's pro-choice. He's open on a lot of issues. On fiscal issues, he's pretty moderate."

But Busch said Ehrlich caved in to pressure from his conservative base by vetoing the tax bill, a plan he had negotiated with legislative leaders, after 42 of 43 House Republicans voted against the package. "It was the first indication that the party was going to drive him to the right," Busch said.

For the most part, Ehrlich's decisions this week were consistent with promises he made on the campaign trail last year, his voting record as a legislator and his public statements since he was sworn in four months ago.

After lawmakers killed his proposal to legalize slot machine gambling in March, Ehrlich vowed to retaliate by rejecting higher taxes on corporations and other fees. Democrats passed a tax bill anyway, prompting his veto.

"A lot of this is pure politics, political drama at the highest levels," said Donald F. Norris, a professor of policy sciences at the University of Maryland Baltimore County. "It seems to me that he's drawing a line in the sand, that he's telling legislators, 'I told you what I was going to do, you didn't believe me, and I went ahead and did it.' "

Although he had declined for weeks to say whether he would sign the medical marijuana bill, Ehrlich had supported such measures in principle during his eight years in Congress and during last year's gubernatorial race.

"I don't agree with him on that philosophy, but I wasn't surprised," said Senate Minority Leader J. Lowell Stolzfus (R-Somerset), who argued vehemently against the bill. "The Republican Party is maturing. Most people on the conservative side realize we're not getting everything we want, but we're satisfied."

Critics did point out some inconsistencies in Ehrlich's decisions. Although Ehrlich in recent weeks has vowed to cut $1 billion in spending next year to avoid tax increases, he allowed a 5-cent increase in the state property tax rate.

And while Ehrlich has argued that Maryland has spent beyond its means in recent years, the governor picked up the budget ax only after lawmakers rejected his proposal to legalize slot machines, which would have generated $800 million a year in new funds for the state treasury.

"We can do better. The governor can do better," said Senate President Thomas V. Mike Miller Jr. (D-Prince George's). "Thus far, his actions are wrong and off base."

Some Democrats were already preparing a campaign to reverse some of Ehrlich's vetoes. Montgomery County Executive Douglas M. Duncan (D) wrote letters to Miller and Busch yesterday, asking them to override the governor's rejection of a bill that would have allowed county leaders to raise vehicle registration fees to generate money for transportation projects.

Republicans, too, were not pleased with all of the governor's decisions.

Baltimore County GOP Chairman Donald Murphy said party activists in Ehrlich's home county are "very much opposed" to proposals to assist illegal immigrants, including a bill the governor signed that creates a commission to explore whether the state should allow illegal immigrants to obtain driver's licenses.

"We're not even two years from 9/11," Murphy said, "and this bill would make it easier for illegal immigrants to get valid identification."

But other GOP leaders said few in the party had soured on the party's first governor in Maryland since Spiro T. Agnew resigned 34 years ago.

John Kane, chairman of the Maryland Republican Party, said Ehrlich's actions underscored his appeal to Democrats and Republicans alike. "You have to govern from the center and govern for all Marylanders," Kane said, "and I think this governor knows that."

Staff writers Matthew Mosk and Jo Becker contributed to this report.

Gov. Robert L. Ehrlich Jr. prepares to sign into law bills on medical use of marijuana, CareFirst and the Maryland pension board.