Editor's Note: Julian E. Zelizer is a professor of history and public affairs at Princeton University's Woodrow Wilson School. He is the co-editor of "Rightward Bound: Making America Conservative in the 1970s" and is completing a book on the history of national-security politics since World War II, to be published by Basic Books.

PRINCETON, New Jersey (CNN) -- President-elect Barack Obama and Sen. John McCain will meet for the first time on Monday since the election.

The meeting comes at an important time for McCain, who must decide what to do with remainder of his career in the Senate.

With his reputation severely harmed as a result of the campaign -- some Republicans furious at him for having lost the White House with a poor campaign and some Democrats furious with the negative tone that his campaign embraced in September and October -- he will have an interest in building a positive legacy.

McCain's best bet would be to form a bipartisan alliance with Obama on as many issues as possible -- perhaps with an economic stimulus bill, immigration reform, exiting Iraq and new regulations on Wall Street.

Doing so would help the president secure bipartisan support while McCain would go down in the record books for helping the nation, through legislation, in a time of grave crisis.

Bipartisan alliances usually happen when two people of opposing parties need each other for their own self-interest. This is the situation right now. Obama could use McCain to make sure his legislation survives the Senate. McCain needs Obama to help restore his legacy in political history.

There are not many models for McCain to turn to for inspiration, but he might think a bit about the Republican Wendell Willkie, defeated by President Franklin D. Roosevelt in 1940.

Though not a legislator, Willkie became a very important ally to FDR after 1940, fighting against isolationism in the GOP and building support for the president's foreign policy. He traveled around the globe to meet with foreign leaders and wrote a book that promoted the internationalist outlook.

Don't Miss

In fact, there is a long tradition of this kind of cooperation in congressional history. We have seen how this can work on foreign policy.

Michigan Sen. Arthur Vandenberg, who coined the phrase "politics stops at the water's edge," worked closely with President Harry Truman in 1947 and 1948 to find support in the Republican Congress for the creation of the modern national security state.

In 1953 and 1954, Senate Minority Leader Lyndon Johnson of Texas worked with President Dwight Eisenhower on a series of foreign policy issues. The White House was under attack from conservative Republicans led by John Bricker, who sought to curtail executive power on foreign affairs.

Bricker proposed an amendment to limit the ability of the president to enter into international agreements without Senate consent. Many southern Democrats supported the amendment fearing that the U.N. Charter opened the opportunity for the president to expand civil rights.

Eisenhower thought the amendment would be extremely dangerous and handcuff the president when dealing with foreign policy. He turned to Lyndon Johnson, who brought along Senate Democrats to stifle the measure. Johnson hoped to make Senate Republicans seem like the obstructionists in Washington and to boost his own reputation as a leader.

Johnson's adviser, George Reedy, explained that the contrast of Republican intra-party warfare and "a dignified but pointed record on all issues" from the Democratic Party would be "potent campaign ammunition." The strategy worked. Johnson was selected as majority leader in 1954.

These alliances have also furthered the social agenda. As president in 1964, Johnson turned to Illinois Sen. Everett Dirksen to help him push the Civil Rights Act of 1964 through the Senate. In the 1960s, Southern Democrats, who chaired the major committees and were masters at using the Senate filibuster to block bills they opposed, were the chief opponents of civil rights.

So when Johnson pushed for the Civil Rights Act in 1964 he needed Republican support to break a filibuster. He found a partner with Dirksen, one of several Republicans who saw how the GOP could benefit from embracing civil rights as Democrats were divided.

"We dare not temporize with the issue which is before us," Dirken said in a speech before the Senate, "it is essentially moral in character. It must be resolved. It will not go away. Its time has come."

Dirksen's role in the passage of civil rights defined his role in the history books.

Bipartisan, inter-branch alliances have also bolstered the reputation of legislators who tackled unpopular fiscal issues such as deficit reduction. The alliances became less common after the 1970s as a result of polarization in Washington that diminished the role of centrists and the opportunity for compromise.

In 1990, President George H.W. Bush worked closely with House Ways and Means Chairman Dan Rostenkowski to design a deal that cut spending and increased taxes to reduce the deficit. Republicans were furious with the president for breaking his pledge in 1988 not to raise taxes.

Rostenkowski's career would go down in ignominious fashion as a result of a scandal, but his work on deficit reduction remains a testament to his ability to find bipartisan opportunities in rough, bipartisan waters.

"What's at stake here?" he asked his colleagues about the deal, "Nothing less, in my opinion, than American self-respect."

There are many other examples in American history where legislators enhanced their reputations in the history books by working with presidents, including presidents from other parties. This is McCain's best hope for strengthening his political legacy.

He will likely never be the kind of legislator who becomes a champion of a political ideology -- like Ted Kennedy and liberalism, or Newt Gingrich and conservatism -- nor is he likely to be the kind of forceful party leader like Tom DeLay or Trent Lott.

But what McCain can do, as he has done in the past with campaign finance and ethics reform, is to team up with the opposition and get legislation through Congress. According to Congressional Quarterly, former Bush and McCain adviser Mark McKinnon has predicted that "Senator McCain's interest after this election will be not any political ambition but a genuine desire to make his last chapter in Washington all about bipartisan healing."

Now he has a chance to enhance his mark in the history books, this time with the person who defeated him, and then his legacy would not be the failed political campaign of 2008.

The opinions expressed in this article are solely those of Julian Zelizer.