The General Assembly sessions starting in Maryland and Virginia this week will usher in a new era of partisan politics for the two state governments, reinforcing differences between the governors and opposition majorities in the legislatures as they try to solve their worst budget problems in decades.

In Annapolis, Robert L. Ehrlich Jr., who won election as Maryland's first Republican governor in 36 years after promising no new taxes on sales or personal income, faces an overwhelmingly Democratic assembly whose leaders are already promoting possible tax increases.

In Richmond, Mark R. Warner, a Democrat who enjoyed unusually cordial relations with the Republican-controlled legislature during his first year, now faces an emboldened GOP majority that is itching for partisan battles in advance of the November legislative elections.

While each state has its own political character and unique budget demands -- Maryland must begin closing a projected $1.2 billion shortfall, while Virginia has $1.2 billion left to go on a nearly $6 billion shortfall -- the two are mirror images when it comes to escalating costs, regional needs and a stark political gulf between the executive and legislative branches of government.

The budget shortfalls afflicting nearly all states only exacerbate tensions in the often uneasy relationships between governors and lawmakers. Maryland spends nearly $22 billion annually, while Virginia, which operates on a two-year budget cycle, spends almost $26 billion a year.

"The budget process is where the toughest decisions are made, even in good years," said Alan Rosenthal, an expert on state legislatures at Rutgers University's Eagleton Institute of Politics. "A tough budget brings out the greatest partisanship."

Warner, 48, and Ehrlich, 45, have very different backgrounds and skills for dealing with their potentially hostile legislatures, but both have gone out of their way to make gestures across the aisle, often out of political necessity.

Ehrlich served eight years in Annapolis before going to Congress. He has named Democrats to his transition team and appointed one former lawmaker from the party to his legislative lobbying group. Warner, in his first elective office, included Republicans in his Cabinet and legislative team.

In interviews, both governors said they fully expect major legislative challenges this session, both on budget issues and on ideological fronts.

"It's an election year, and people are going to be looking for ways to try to gain partisan advantage," Warner said.

Said Ehrlich: "Politically, I worry about what kind of reception we're going to get from the General Assembly."

At the same time, both chief executives said they have strong records of working cooperatively with leaders of the other party.

As a member of the GOP minority in Annapolis, Ehrlich was respected by ruling Democrats. He has begun cultivating key legislative leaders in advance of his Jan. 15 inauguration. Warner regularly consults leading Republican lawmakers and forged a bipartisan alliance in his failed attempt to win a transportation tax in a November referendum.

The Democrat is also lining up GOP co-sponsors for the major bills he is pushing this session, a first for Richmond.

By coincidence, the House of Delegates in each state capital will have a new presiding officer, which poses problems for Ehrlich and Warner alike.

In Maryland, Ehrlich hopes to draw on his long friendship with the next House speaker, Michael E. Busch (D-Anne Arundel), but Busch has already opposed the new governor's key budget initiative, increasing state revenue by legalizing slot machines at four racetracks.

Tax increases this year are a real possibility, in part because Ehrlich's budget-balancing plan does not "add up," Busch said.

"If you believe the purpose of state government is to provide a quality education, a quality transportation system, if you believe you should have access to health care and adequate public safety needs met, then you have to pay for them," Busch said.

William J. Howell (R-Stafford), who will become the Virginia House speaker in the wake of the forced resignation of the incumbent in a sexual harassment scandal, said that while he agrees with many of Warner's proposals on streamlining government, the GOP is now in a position to redirect and limit state spending dramatically.

"The Republican majority, on the House side, is still kind of settling in" after building to a record 64 members in the 100-seat House, Howell said. "You're going to see some initiatives come through this year and next year that show a Republican direction, a Republican impact."

Howell and other senior GOP lawmakers have criticized broad elements of Warner's budget-balancing plan, saying it relies on too many one-time fixes, and they also have vowed to rewrite specific items. For instance, many Republicans in the House and Senate hope to reallocate about $7 million to reopen several Department of Motor Vehicles customer service centers that Warner ordered closed late last year.

"The governor's budget is extremely precarious," said House Appropriations Chairman Vincent F. Callahan Jr. (R-Fairfax). "He resorted to the same gimmicks, the same smoke and mirrors, that Gilmore used, and he did not address the core problem of the structural imbalance in our budget." James S. Gilmore III (R) preceded Warner as governor.

In perhaps the most direct affront to Warner, many Virginia Republicans are pushing a repeal of the state's estate tax, an idea that the Democrat said should be delayed until the legislature considers a top-to-bottom rewrite of the antiquated tax code. GOP leaders have also said they embrace Warner's proposal to allow two-term governors, but only if the executive branch cedes some appointment powers, a change the incumbent may be reluctant to impose on his successors.

Like the Old Dominion's legislative majority, Maryland Democrats said they see some political opportunities in the budget Ehrlich is scheduled to release two days after his swearing-in.

Democrats are taking a populist approach, targeting corporate tax loopholes such as the one allowing Maryland businesses to avoid paying approximately $100 million a year by shifting in-state profits to holding companies in Delaware.

Busch, the incoming House speaker, and other senior lawmakers said the state should consider a range of taxing options, including a temporary income tax rate increase on wealthy individuals, repealing the tax exemption for HMOs and expanding the sales tax to include services such as dry cleaning and legal work.

"You pick out a tax break worth $20 million and then you pair that up against a $20 million program to provide dialysis or mental health," said House Majority Leader Kumar P. Barve (D-Montgomery). "We'll say that's what [Ehrlich] is doing -- kicking people off dialysis to save this corporate welfare."

"It crystalizes the difference between the two parties," Barve said.

In addition to budget battles, the executives and legislatures are certain to squabble over policy initiatives on a range of hot topics, including education, abortion and gun control.

Ehrlich plans a push to encourage charter schools and more faith-based social-service programs. He also wants to review some of the state's gun-control laws, among the strictest in the nation, and institute a program akin to Virginia's requiring longer prison sentences for felons who use guns.

During the Washington area sniper shootings, Ehrlich promised to lift a moratorium on executions imposed by Gov. Parris N. Glendening (D) and said he would consider legislation that would make 17-year-olds eligible. Democrats may try to further restrict the death penalty, a move that could be bolstered by a soon-to-be-released study on whether it is applied in a racially biased manner.

Ehrlich acknowledged that his agenda could encounter opposition from a Democratic leadership team that he said has grown more liberal. "By any measure, it's further to the left. That has raised concerns," he said.

In Virginia, social legislation will originate with Republican lawmakers, who may send Warner a torrent of bills to restrict certain late-term abortions, require parental consent for abortions sought by minors and ease some firearms statutes.

Last year, Warner vetoed a proposed ban on what opponents call "partial-birth" abortions, and the more moderate state Senate sustained the veto. The Democrat said he was prepared to veto that measure -- and others like it -- if such bills land on his desk this year.

"I . . . said pretty clearly last year that if I saw something such as posting the Ten Commandments [in public schools], that, in my mind, went over the line," Warner said. "I imagine there will be some of those pieces, particularly social engineering legislation, that will go over the line."

Robert L. Ehrlich Jr. (R) says he worries about the Maryland legislature's politics.Gov. Mark R. Warner (D) says Virginia lawmakers will look for partisan advantages.