If U.S. lawmakers reach a deal to raise the U.S. borrowing limit and avoid default, it could spur a relief rally in Wall Street stocks and a rise in U.S. government yields on Monday.

"We're very close," said Senate Minority Leader Mitch McConnell, the top Senate Republican who is playing a key role in the negotiations on a plan to reduce the deficit and permit a vote to raise the $14.3 trillion debt ceiling.

U.S. lawmakers were close to a last-gasp deal on Sunday to raise the U.S. borrowing limit and assure markets that the United States will avoid a default.

The tantalizing possibility of an agreement raised hopes that a bitter, weeks-long partisan battle over cutting the U.S. deficit might be nearing a close.

"If we can put this to bed, we can go back to a normalized market -- one that trades on fundamentals and not fear," said Steven Wolf, managing director of investments at Source Capital Group in Westport, Conn.

David Plouffe, a senior adviser to President Barack Obama, cited general agreement on a plan to cut the U.S. deficit over 10 years in two stages: $1 trillion up front and the rest based on the recommendation of joint bipartisan committee.

Anxiety over the debt crisis and the U.S. economic outlook sent the S&P 500 lower last week, resulting in the worst week and month for the benchmark index since last August.

The CBOE Volatility index, Wall Street's "fear index," rose more than 40 percent, its biggest jump since May.

U.S. Treasury prices rallied last week as investors clung to relatively safe U.S. government debt and concluded that a weak economy meant the Federal Reserve would keep monetary policy accommodative for the foreseeable future.

A stock market rally prompted by a debt ceiling deal could be tempered, however, by the uncertain outlook for the U.S. economy, an outlook that would not be helped by a debt ceiling plan based on fiscal austerity.

Government data released on Friday showed the U.S. economy stumbled badly in the first half of 2011 and came close to contracting in the January-March period.

That data offered little hope that this week's data -- including July's employment report -- can turn the tide of the pressure.

"Put it this way: putting all the debt deal concerns aside, the (stock) market would probably be here anyway," said Michael Marrale, managing director and head of sales trading at RBC Capital Markets in New York.

Any relief enjoyed by the stock market would probably come at the expense of the U.S. Treasury market, which benefited from its safe-haven status during the debt ceiling conflict. That would lead to higher U.S. yields.

Still, any rise in U.S. Treasury yields resulting from diminished anxiety about the debt ceiling would be limited by the troubled outlook for the U.S. economy, circumstances that appear to ensure that the Federal Reserve's monetary policy will remain accommodative for a long time.

The deadline for raising the U.S. debt ceiling has investors on edge.

"You've got individual stocks that can make significant moves but the market itself collectively is being pushed and pulled by every headline and how the wind is blowing out of Washington at any given moment," said Rick Bensignor, chief market strategist at Dahlman Rose in New York.

The recent slide has also put stocks in a precarious position from a technical perspective as the S&P 500 index moves closer to its 200-day moving average, a level which could bring about additional selling if the index breaks below it.

The benchmark index successfully bounced off the level on Friday after the early morning decline.

"That is the line in the sand that really divides things going maybe bad -- to things really turning bad," said Paul Mendelsohn, chief investment strategist at Windham Financial Services in Charlotte, Vermont.

Even if a deal is struck, a possibility remains the United States could lose its triple-A credit rating if the terms are not draconinan enough to satisfy credit rating agencies.

Investors can still find some solace in corporate earnings. According to Thomson Reuters data through Friday, of the 327 S&P 500 companies that have posted earnings, 73 percent have reported results higher than analysts' expectations.

Companies due to report earnings this week include Kraft Foods Inc, Clorox Co, Pfizer Inc and Prudential Financial Inc.

In addition to weak economic data, corporate earnings, and U.S. debt ceiling developments, investors must remain prepared for any developments from the simmering debt crisis in the euro zone, which could further heighten investor angst.

"There are two things I keep my eye on -- one on Washington and one on Brussels, because between the two of them you never know which headline risk is going to hit you over the head next," said Paul Mendelsohn, chief investment strategist at Windham Financial Services in Charlotte, Vermont.

(Additional reporting by Chuck Mikolajczak; Editing by Bernard Orr)