New single-family home sales unexpectedly fell in June, but a sharp rise in prices and declining supply suggested the market for new houses was starting to stabilize, a government report showed on Tuesday.

Other data showed consumers grew more confident about the future this month, even though there were still concerns about lack of jobs.

The Commerce Department said new single family homes sales slipped 1 percent to a seasonally adjusted 312,000-unit annual rate. However, the median sales price for a new home increased 5.8 percent last month to $235,200.

Compared to June last year, the median price rose 7.2 percent. The rise in prices is the latest sign that home values are starting to stabilize.

New home prices ... appear to have reached a bottom. However, that conclusion must remain tentative given the large number of distressed properties, said Steven Wood, chief economist at Insight Economics in Danville, California.

Fortunately, with no excess ... inventory of unsold new homes, any sustained rebound in new home sales should quickly translate into firmer prices.

U.S. stocks pared losses as a better-than-expected reading on consumer confidence boosted investor optimism, while U.S. bond prices were steady at higher levels. The dollar fell because of the stalemate in Washington over raising the debt limit.

The Conference Board said on Tuesday its index of consumer attitudes rose to 59.5 from 57.6 in June, beating economists expectations for a reading of 56.0.

The reports were hopeful signs for the economy, which has struggled to pull out of a soft-patch.

You got some improvement (in consumer confidence) but I think the one thing that was not very encouraging is that the present situation actually fell, said Tom Porcelli, U.S. economist at RBC Capital Markets.

The increase was due to future expectations. It's good to be hopeful for the future but we want consumers to be more confident in the present.

Recent data ranging from employment to retail sales suggest growth might not rebound as strongly as initially anticipated, and economists warn that failure to raise the country's debt limit could push the fragile economy over the edge.

The government is expected to report on Friday that the economy grew at a 1.8 percent annual rate, according to a Reuters survey, after a tepid 1.9 percent pace in the first three months of the year.

The anticipated pedestrian growth pace will mostly reflect a sharp deceleration in consumer spending, which was hampered by high gasoline prices and a shortage of some popular motor vehicle models because supply disruptions from Japan.

New home sales last month fell as sales in the Northeast tumbled to a record low. Sales were also pulled down by a sharp drop in the West.

Economists polled by Reuters had forecast sales at a 320,000-unit rate. In the 12 months through June, new home sales rose 1.6 percent.

Despite lean inventories, recovery in the market for new homes is being frustrated by a glut of previously owned homes, which are currently selling well below the cost of new construction.

There were a record low 164,000 new homes available for sale in June. That compares to about 3.77 million used homes on the market in June, plus properties that are in foreclosure.

The scarcity of new homes is encouraging builders to break ground on new projects. Data last week showed housing starts rose to a six-month high in June.

Other data on Tuesday showed single-family home prices were unchanged in May. The S&P/Case Shiller composite index of home prices in 20 metropolitan was flat on a seasonally adjusted basis after rising 0.4 percent in April.

However, prices fell 4.5 percent from a year-ago.

Data last week showed the median price of an existing home in June increased 0.8 percent to $184,300 from a year ago.

At the June's sales pace, the supply of new homes on the market fell to 6.3 months' worth, the lowest since April 2010, from 6.4 months' worth in May.

(Reporting by Lucia Mutikani; Editing by Neil Stempleman)

(This story was corrected in fourth paragraph from the end to say home prices for the S&P/Case Shiller index rose in April, not May)