BREVARD COUNTY, Fla. -

Brevard County Sheriff Wayne Ivey welcomed a new deputy who overcame an injury sustained in Iraq.

Friday the Brevard County Sheriff's Office swore in Cpl. Robert Smith, of the United States Marine Corps, officials said.

Deputies said Smith wanted to be a law enforcement officer but chose to serve his country first by joining the Marine Corps.

In May 2008 while on military patrol Fallujah, Iraq Smith's unit encountered an IED that exploded, injuring several in the unit including Smith.  Smith lost his right leg, which threatened his dream of becoming a law enforcement officer, officials said.

The explosion was actually recorded by a terrorist who played the video of Smith being severely injured on Al Jazeera.

Following the incident Smith was awarded the Purple Heart and was fitted with a prosthetic leg after his recovery.

At a presentation about two years ago Smith made it clear to those gathered that he hoped to one day still be able to serve his community as a deputy sheriff. Sheriff Ivey and Chief Mike Lewis were present at the presentation and extended an offer to Smith that if he could pass the Law Enforcement Academy,  background requirements and the intensive physical assessment test, he would be hired as a deputy sheriff.

In July Smith graduated and passed all the tests.

"Robert refused to allow his injury to derail his dream of serving his community and clearly demonstrated that determination, will to succeed, family support, and commitment can overcome any challenge," Ivey said.

Smith is the second member of the agency that was severely injured while serving his country.