WASHINGTON  It was Senator Barack Obama who crossed the aisle.

On Wednesday evening, as the senators gathered to vote on the $700 billion financial rescue package, Mr. Obama, Democrat of Illinois, walked over to the Republican side of the chamber to extend a greeting to Senator John McCain of Arizona.

While it took Mr. Obama several seconds to make his way over to Mr. McCain, the actual handshake lasted barely a second, as Mr. McCain responded with a chilly look, a turn of his head and a brief return handshake.

The moment provided a rare element of drama in an otherwise routine evening of votes. It was a curious sight on Capitol Hill, the second time in less than a week that the presidential candidates crossed paths in Washington over deliberations on the package intended to stabilize the nation’s financial system.

Mr. Obama, who first arrived on the Senate floor at 5 p.m., presented his argument in favor of the legislation in a 13-minute speech.