U.S. Markets close in 4 hrs 11 mins

FOREX-Dollar heads for 1st weekly gain in five on debt optimism

* Dollar rises vs yen on prospect of U.S. debt deal

* Republicans offer plan to stave off default threat

* Dollar index on pace for 0.3 percent rise this week

By Wanfeng Zhou

NEW YORK, Oct 11 (Reuters) - The dollar edged lower against

a basket of major currencies on Friday but was headed for its

first weekly gain in five, as optimism grew Washington may soon

clinch a stop-gap deal to avert a devastating U.S. default.

President Barack Obama and Republican leaders appeared ready

to end a political crisis that has shuttered the U.S. government

and pushed the country dangerously close to default after

meeting at the White House on Thursday. One senior Republican

said an agreement could come on Friday.

But uncertainty remained as the likelihood of no deal until

the Oct. 17 deadline is still high, analysts said, which could

pressure the dollar and help safe-haven currencies such as the

yen. Worries about the U.S. budget and debt crisis had driven

the dollar to an eight-month low last Thursday.

"A short-term deal would keep the level of uncertainty

relatively high and likely keep consumers' and business

sentiment pressured," said Omer Esiner, chief market analyst at

Commonwealth Foreign Exchange in Washington D.C.

"The ongoing fiscal drag would in-turn, likely keep the

Federal Reserve from scaling back its monetary easing further

into 2014."

The dollar index, which tracks the greenback against

a basket of six major currencies, slipped 0.1 percent to 80.329.

It's on pace for a gain of 0.3 percent this week, the first

weekly rise since early September.

The dollar rose 0.1 percent to 98.27 yen, having hit

a session peak of 98.55 yen, according to Reuters data, the

highest since Oct. 1. Support is seen at the 200-day moving

average of 96.87 yen.

The euro rose 0.3 percent to $1.3557.

Paul Bednarczyk, head of research at 4CAST said markets were

hoping for a deal before the end of the weekend.

"If we get a deal that is more than just can-kicking, then

equities will go up and dollar/yen will go up with it. There is

a very reliable correlation at the moment and nobody is going to

fight it," he said, adding that the dollar could target 100 yen.

High-yielding, growth-sensitive currencies rose. The New

Zealand dollar gained 0.6 percent to $0.8323. The

Australian dollar also rose slightly to $0.9454.

The fiscal impasse has taken the spotlight off the Federal

Reserve. But expectations are growing the central bank will have

to evaluate the impact of a government shutdown, entering its

11th day, before starting to scale back its stimulus.

A survey showed Friday U.S. consumer sentiment deteriorated

in October to its weakest level in nine months as the first

federal government shutdown in 17 years undermined Americans'

outlook on the economy. The dollar showed little

reaction to the data.

"If it was not already, it will be near impossible for the

Fed to commence tapering before year-end if only a six-week debt

extension is agreed," said Tom Levinson, FX strategist at ING,

in a note to clients.

He said the dollar index would struggle to sustain a rally

to 81.00, the level it reached before the Fed surprised markets

on Sept. 18 by opting not to start trimming its bond buying.