Job openings slipped in May, but the hiring rate climbed to the highest level in nearly two years, government data showed on Tuesday.

Analysts said although the rise in the hiring rate -- the number of hires as a percentage of total employment -- reflected temporary census workers, the overall data was consistent with a gradual labor market improvement.

The positive thing is job openings in general have been trending higher since February, even though they dipped in May. It confirms that the labor market has bottomed, there are some new jobs (being created), said Harm Bandholz, chief US Economist at UniCredit Research in New York.

Job openings, a measure of labor demand, dipped to 3.21 million from 3.30 million in April, the Labor Department said in its monthly Job Openings and Labor Turnover Survey.

The job openings rate, a gauge of how many jobs were still open at the end of the month, eased to 2.4 percent from 2.5 percent in April.

But hirings rose to 4.50 million from 4.29 million, lifting the rate of hiring to 3.4 percent -- the highest since August 2008 -- from 3.3 percent in April.

Despite the slip in May, job openings have risen 37 percent from a low of 2.3 million in July last year. Still, they remain below their pre-recession levels.

Temporary hiring for the decennial census lifted nonfarm payrolls to 433,000 in May, with the private sector adding only 33,000 jobs. Payrolls, however, dropped 125,000 in June as the bulk of the census jobs ended.

Tuesday's report showed companies are still laying off workers, although not at the same pace as last year. In May, there were 1.87 million layoffs, up from 1.76 million in April. The bulk of the layoffs in May were from the private sector, with the government accounting for only 157,000.

Analysts said the layoffs helped to explain the sticky initial jobless claims, which remain above levels usually associated with sustainable job growth.

(Reporting by Lucia Mutikani; Editing by Dan Grebler)