Stocks were mostly flat on Friday on heightened uncertainty about the government's ability to reach a debt-reduction deal, but a sharp rise in Google shares lifted the Nasdaq.

President Barack Obama held a White House news conference on Friday to underscore the importance of agreeing on a deficit-reduction plan to prevent a looming default. Standard & Poor's warned late on Thursday that there is a one-in-two chance it could cut the United States' triple-A rating if an agreement is not reached soon.

We're drifting and waiting for clarity on all these different issues, said Fred Dickson, chief market strategist at D.A. Davidson & Co. in Lake Oswego, Oregon.

Each day, the deck chairs get slightly rearranged, he said. We saw the market react to President Obama's news conference where he continued to provide more detail on progress or lack of progress on negotiations. We saw the market selloff and then bounce back.

Google Inc's earnings beat the most bullish forecasts late on Thursday, driving its stock up 12.7 percent to $596.14, making it the top gainer in the Nasdaq 100.

The Dow Jones industrial average <.DJI> was up 3.59 points, or 0.03 percent, at 12,440.71. The Standard & Poor's 500 Index <.SPX> was up 1.75 points, or 0.13 percent, at 1,310.62. The Nasdaq Composite Index <.IXIC> was up 13.97 points, or 0.51 percent, at 2,776.64.

The CBOE Volatility Index <.VIX>, Wall Street's fear gauge, was down 0.6 percent for the day.

Wall Street advanced earlier in the day after an industry health check of European banks came out slightly better than expected. The European Banking Authority (EBA) said that of the 90 European banks tested, only eight had failed the stress tests performed to determine if they could withstand a long recession. Expectations were for up to 15 banks to fall short.

The positive is, we're moving toward increased transparency, said Paul Ehrlichman, head of global equity at Global Currents in Wilmington, Delaware. The bank stress tests, if they continue to do them, will reveal more about the weak parts of the banks' balance sheets.

Energy and tech shares led the day's gains. The S&P energy sector index <.GSPE> rose 1.9 percent, while the S&P info technology sector index <.GSPT> gained 1.1 percent.

Consumer discretionary stocks were among the biggest drags after a report showed U.S. consumer sentiment slipped in July to its lowest level since March 2009, according to the Thomson Reuters/University of Michigan survey.

Home Depot fell 1.1 percent to $35.57, while the S&P 500's discretionary index <.GSPD> shed 0.5 percent.

Citigroup Inc posted higher net income, helped by falling credit losses. But the stock dropped 2 percent to $38.23 in late afternoon trading after being in positive territory in the morning.

Two large merger offers also improved investor sentiment. BHP Billiton's $12 billion offer to purchase Petrohawk lifted shares in the energy sector, and investor Carl Icahn's offer to buy Clorox Co for $10.2 billion pushed the consumer products company's stock up 9.3 percent to $74.78.

BHP Billiton's bid for Petrohawk, which jumped 62.6 percent to $38.20, drove up shares in the energy sector as investors speculated that more deals are ahead. Chesapeake Energy rose 7.9 percent to $32.60, while the Select Sector Energy SPDR Fund , an exchange-traded fund, rose 2.4 percent to $76.64.

(Reporting by Ashley Lau; Editing by Jan Paschal)