Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Flags will fly at half-staff at the White House and on federal grounds through sunset on Saturday to honor the service members killed in the shooting rampage last week in Chattanooga, Tennessee, the Obama administration announced on Tuesday.

President Barack Obama said the thoughts and prayers of the country were with the four Marines and sailor who were killed, and he expressed gratitude to the police and first responders who stopped the attack and saved lives.

"We draw strength from yet another American community that has come together with an unmistakable message to those who would try and do us harm: We do not give in to fear," the president said in a statement. "You cannot divide us. And you will not change our way of life."

A family brings flowers to a makeshift memorial near a US Military Recruiting storefront after a shooting in Chattanooga, Tennessee, USA, 16 July 2015. Authorities say the shootings at two different locations left four US Marines and the gunman Mohammod Youssuf Abdulazeez dead. EPA/ERIK S. LESSER ERIK S. LESSER / EPA

The announcement coincided with a speech by the president to the national convention of the Veterans of Foreign Wars, held in Pittsburgh.

Obama pressed his case for the nuclear deal with Iran, saying that sending troops into battle isn’t always the smartest approach. Some Republicans have criticized the agreement as dangerous and shortsighted.

“I’m hearing echoes of some of the same policies and mindset that failed us in the past,” the president said. "Who paid the price? Our men and women in uniform.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The White House rolled out online tools to argue for the deal, including a Twitter feed, @theirandeal, and a web page.

Watch @POTUS lay out the facts about the historic nuclear deal with Iran. #IranDeal http://t.co/ZUqw655F4h — The Iran Deal (@TheIranDeal) July 21, 2015

The president also called on Iran to free the Americans it is holding and U.S. military presence in the Middle East amidst the rise of ISIS. He also lauded moves toward normalized diplomatic relations with Cuba.

Related: U.S. Families of Americans Jailed in Iran Seek Release

He also vowed that his administration would continue to work on shortening wait times at Department of Veteran Affairs facilities. He highlighted federal efforts to hire new doctors, open more clinics and help vets find care elsewhere if the commute to a clinic is too long.

"We've got to acknowledge (our) work is not done," the president said, adding "I'm still not satisfied."

Obama used the VFW speech to promote a crackdown on predatory lenders who target active-duty soldiers and other service members.

The administration emphasized that the new rule was announced on the fifth anniversary of the financial reform law known as Dodd-Frank, which created the Consumer Financial Protection Bureau.

A decade ago, things "were at a crisis point," Holly Petraeus, the bureau's assistant director of servicemember affairs, told reporters ahead of the speech. She said some payday lenders set up outside bases and charge interest rates of as much as 450 percent.

In 2006, Congress sought to clean up military lending by passing a law capping interest rates at 36 percent. But the law had loopholes, and its protections did not apply to payday loans greater than $2,000 or borrowed longer than 91 days.

Related: GOP again targets predatory lending protections for US troops

Petraeus said she visited bases across the country, where financial counselors told her that troops were struggling under high-interest loans. The administration said it did not have figures for how many troops were affected.

The new rule covers more types of loans and makes all loans subject to the 36 percent cap. It also blocks lenders from requiring service members to send a portion of their paychecks. The rule begins taking effect Oct. 1.