President Barack Obama puts on a gift jacket presented to him by graduates of the Lake Area Technical Institute, after delivering the commencement address to the 2015 graduating class of Lake Area Technical Institute, in Watertown, South Dakota, May 8, 2015. (AP Photo)

President Barack Obama puts on a gift jacket presented to him by graduates of the Lake Area Technical Institute, after delivering the commencement address to the 2015 graduating class of Lake Area Technical Institute, in Watertown, South Dakota, May 8, 2015. (AP Photo)

This past Friday, after flying to South Dakota to deliver a commencement speech, Barack Obama accomplished something that only three other U.S. presidents have managed before him — he set foot in all 50 U.S. states.

“I have now been to all 50 states as president and I was saving the best for last,” he said to the crowd at Lake Area Technical Institute. “To the other 49, I hope you take no offense.”

Other presidents who hit the 50-state mark were Richard Nixon, George H.W. Bush and Bill Clinton.

While some people in South Dakota wore “Saved the Best for Last” t-shirts ahead of the presidential visit, the commander in chief might have had his own reasons for not rushing over. South Dakota is a Republican-leaning state which voted against him in the last two presidential elections.

When announcing his final stop last month, Obama told a local television station KSFY-TV, “I can’t let my South Dakota friends feel neglected.”

In his quest to visit all 50 states, the president spent the last year visiting some red states he lost by big margins both in 2008 and 2012. This past January, he visited Idaho, which he lost 65 percent to 33 percent during the 2012 election.

“I got whupped twice,” he said while visiting Boise State University, according to CBS News. “I got whupped twice. But that’s okay, I’ve got no hard feelings.”

Pete Souza, the chief official White House photographer, tagged along on each of these visits and put together a pictorial of the president’s journey to (almost) every corner of the country he leads.

Here are a few examples:

Arizona

Arizona, Aug. 16, 2009. Viewing the Grand Canyon. (Official White House photo by Pete Souza)

Arizona, Aug. 16, 2009. Viewing the Grand Canyon. (Official White House photo by Pete Souza)

.

California

California, July 23, 2014. Viewing the Golden Gate Bridge in San Francisco. (Official White House Photo by Pete Souza)

California, July 23, 2014. Viewing the Golden Gate Bridge in San Francisco. (Official White House Photo by Pete Souza)

 

Connecticut

Connecticut, Dec. 16, 2012. Making last-minute edits to his speech in Newtown, before a vigil for those killed at Sandy Hook Elementary School. (Official White House Photo by Pete Souza)

Connecticut, Dec. 16, 2012. Making last-minute edits to his speech in Newtown, before a vigil for those killed at Sandy Hook Elementary School. (Official White House Photo by Pete Souza)

.

Georgia

Georgia, May 19, 2013. Graduates cheering the President during a heavy downpour at Morehouse College in Atlanta. (Official White House Photo by Pete Souza)

Georgia, May 19, 2013. Graduates cheering the President during a heavy downpour at Morehouse College in Atlanta. (Official White House Photo by Pete Souza)

 

Idaho

Idaho, Jan. 21, 2015. Posing for a photo with kids at Boise Airport. (Official White House Photo by Pete Souza)

Idaho, Jan. 21, 2015. Posing for a photo with kids at Boise Airport. (Official White House Photo by Pete Souza)

.

Michigan

Michigan, April 18, 2012. Sitting on the famed Rosa Parks bus at the Henry Ford Museum in Dearborn. (Official White House Photo by Pete Souza)

Michigan, April 18, 2012. Sitting on the famed Rosa Parks bus at the Henry Ford Museum in Dearborn. (Official White House Photo by Pete Souza)

 

New Hampshire

New Hampshire, Sept. 7, 2012. Joking with the Vice President Joe Biden before a campaign rally in Portsmouth. (Official White House Photo by Pete Souza)

New Hampshire, Sept. 7, 2012. Joking with the Vice President Joe Biden before a campaign rally in Portsmouth. (Official White House Photo by Pete Souza)

 

North Carolina

North Carolina, Oct. 17, 2011. Listening to the President’s remarks in Millers Creek. (Official White House Photo by Pete Souza)

North Carolina, Oct. 17, 2011. Listening to the President’s remarks in Millers Creek. (Official White House Photo by Pete Souza)

 

North Dakota

North Dakota, June 13, 2014. Greeting a young boy during a Flag Day celebration at the Standing Rock Sioux Tribe Reservation in Cannon Ball. (Official White House Photo by Pete Souza)

North Dakota, June 13, 2014. Greeting a young boy during a Flag Day celebration at the Standing Rock Sioux Tribe Reservation in Cannon Ball. (Official White House Photo by Pete Souza)

 

South Dakota

South Dakota, May 8, 2016. The President shows off a note given to him by Rebecca Kelley who had written him a letter asking him to visit South Dakota. (Official White House Photo by Pete Souza)

South Dakota, May 8, 2015. The President shows off a note given to him by Rebecca Kelley who had written him a letter asking him to visit South Dakota. (Official White House Photo by Pete Souza)

 

Texas

Texas, Aug. 9, 2010. Trying on a pair of cowboy boots at the University of Texas in Austin. (Official White House Photo by Pete Souza)

Texas, Aug. 9, 2010. Trying on a pair of cowboy boots at the University of Texas in Austin. (Official White House Photo by Pete Souza)

 

Wisconsin

Wisconsin, Sept. 28, 2010. Cheering with the La Follette Lancers football team during their practice in Madison. (Official White House Photo by Pete Souza)

Wisconsin, Sept. 28, 2010. Cheering with the La Follette Lancers football team during their practice in Madison. (Official White House Photo by Pete Souza)

To see the complete pictorial of President Obama’s visits to all 50 states, click here.