President Barack Obama signed into law a $17.6 billion jobs bill on Thursday and sounded an optimistic note about the U.S. economy, saying it may soon begin adding jobs instead of losing them.

Obama made the comment in the White House Rose Garden as he put his name on legislation that includes a number of incentives aimed at helping small businesses recover from the worst recession since the Great Depression.

Obama is under pressure to reduce a 9.7 percent jobless rate that has remained stubbornly high despite a $787 billion economic stimulus bill that he and his Democrats pushed through the U.S. Congress in February 2009.

A consensus is forming that, partly because of the necessary -- and often unpopular - measures we took over the past year, our economy is growing again and we may soon be adding jobs instead of losing them. The jobs bill I'm signing today is intended to help accelerate this process, he said.

The legislation would exempt businesses from paying the 6.2 percent payroll tax on new employees who had previously been out of work. Employers would also get a $1,000 tax credit if those workers were still on the job a year later.

Obama said that while the jobs bill is absolutely necessary, it is by no means enough. There is a lot more we need to do to spur hiring in the private sector and bring about a full economic recovery.

The bill also subsidizes state and local construction bonds and allocates $19.5 billion to shore up a highway construction program and extend it through the end of the year.

The bill's costs, other than the highway fund, are offset by a crackdown on offshore tax shelters.

(Reporting by Steve Holland; Editing by Doina Chiacu)