Ten years ago, Blake Hall was nearly blown up at work. A platoon leader in the Army Rangers, Hall was in charge of a reconnaissance unit stationed in Mosul, Iraq. His team was on routine patrol one day when a bomb exploded near their base. Then mortar shells began to fall, pummeling the combat hospital inside the base, injuring 10 during the first few blasts.

Suddenly, Hall was racing his men across the Tigris River, hoping to find the mortar unit. They were outnumbered and facing attacks from three directions, without air cover or other support. Yet they ultimately destroyed the unit, capturing four al Qaeda fighters and killing two, Hall says, while avoiding any casualties themselves.

"It was a miracle, really," says Hall, who was awarded a Bronze Star with Valor for that day's work. "God was good to us, to me, that day."

Two years later, he headed back home to a promising civilian life--Harvard Business School, a prestigious internship with McKinsey & Company--that soon got, well, boring. Hunched over Excel spreadsheets in an office tower late one night, Hall turned to another intern and blurted out an uncomfortable epiphany: "Dude, 18 months ago I was hunting down an al Qaeda bomb network," he said. "I don't think I can do management consulting."

It's a feeling familiar to many returning veterans, one that has long spurred them to seek out the challenges and rewards of starting their own businesses. There's nothing remotely like combat, of course. But recent veterans say that entrepreneurship is one of few civilian callings that matches its intensity, and that can bring a similar sense of accomplishment.

"Other than the fact that no one's shooting at you, everything about entrepreneurship is like the chaos of combat," says Joseph Kopser, a veteran-turned-entrepreneur who sold his transportation app, RideScout, to Daimler in 2014. "You need to find allies and partners who don't necessarily exist. Convince people who think an idea is dumb that it might be worth doing. That's the same as telling a chieftain he really ought to work with the Americans."

Not that the similarities make it easy, at all. "My first year as an entrepreneur was the loneliest time of my life," says Hall, now the co-founder and CEO of identification-software company ID.me, based in Tysons Corner, Virginia. "But the one thing about combat is it makes you realize how precious life is. And I knew there wasn't much else I would be happy doing."

That's a refrain common to the tens of thousands of veterans who served during the post-9/11 wars and have gone on to start their own businesses. Those you'll meet in this series, all of whom were deployed to Iraq or Afghanistan after 2001, learned how to be resilient, how to solve problems, and how to lead amid massive uncertainty under some of the most brutal conditions on the planet. Fifteen years after September 11, that same grit is now being applied to the demanding civilian grind and glory of entrepreneurship.

As Hall puts it, as an entrepreneur, "I feel free. In that, I feel incredibly successful."

Harder than combat

Hall says that running ID.me in its early days was the hardest thing he's ever done--and that includes hunting down al Qaeda leaders. "I had no idea what I was doing," says the broad-faced 33-year-old, who's swapped out his Army fatigues for trousers patterned after the American flag.

"In the military, you know the problem you are supposed to solve, and you have a team that is waiting for you," he says. But when starting his company, Hall didn't know if anyone would pay for the solution to the problem he was trying to solve. "That was really scary," he recalls.

It took a while to figure it out. The first iteration of ID.me was called TroopSwap, intended to be a version of Craigslist for military and veterans. With help from Kelly Perdew, an investor and West Point grad who became Hall's mentor, TroopSwap raised just under a million dollars. (Hall says he leaned on the other man so much during that time that he actually bumped Perdew's wife down to number two on Perdew's phone's most-called list. "Kelly called me up and was like, 'I love you, man, but we've gotta talk about time management,' " says Hall.)

Hall had identified companies he thought could be distribution partners for TroopSwap, but then found out it would most likely take them two to three years to roll anything out. As a startup that had just hired a technical team, TroopSwap needed to start scaling faster than that. And it was spending all its time verifying the identities of veterans who were trying to use the site.

Three months and one unsuccessful pivot later, Hall hit upon a new idea: creating a business that streamlines the online checkout process, helping merchants verify identities online in order to offer discounts to specific groups of people, including veterans. In November 2012, after his team had spent a year building software, Under Armour "took a massive chance on us," says Hall, and integrated ID.me into its online checkout procedure.

"The day before we went live--the day before Veterans Day--I remember being so sick to my stomach," says Hall. "Because if this wasn't successful, we had no cards left to play."

But the debut went smoothly--and today, Hall's company has more than 2.5 million registered users, works with more than 200 brands, has raised about $21.5 million, and employs 41 people. "It's been incredible," says Hall. "That's product-market fit. We're in business."

Overcoming war wounds

Nic Gray woke up in jail one morning in 2009, facing two criminal trespassing charges and with no memory of how he got there. Two years earlier, Gray had been a gunner on a Humvee in Iraq, dodging IEDs and sniper fire, and he'd spent the previous evening reminiscing with an Army buddy from his time there. Then Gray went to sleep. A few hours later, he was arrested after he'd kicked in his neighbors' front door while muttering something about "clearing" houses of terrorists.

"I was screwed," says Gray, who was trying to build up a franchise-brokerage company at the time. Usually carefully articulate, with an ex-soldier's close-cropped hair and solid frame, he could see his postmilitary life derailed by the arrest, and by the posttraumatic stress that had caused it: "I was facing a very grim future. I needed a miracle."

Gray is hardly alone in returning from war with injuries that can complicate the quest for a civilian job. Close to one-third of returning veterans have some sort of PTSD, traumatic brain injury, or depression, according to the Rand Corporation. And this mental trauma can have consequences, such as physical outbursts and arrest records, that can make it more difficult for veterans to get (and stay) hired by traditional employers.

Gray, at least, got his miracle. His case was transferred to an experimental veterans' court that offered treatment rather than punishment; he pleaded guilty to one count of trespassing and served no jail time. But his franchise-brokerage business was less fortunate; he says that after the recession, his would-be clients couldn't get bank financing to buy franchises. "It was one of those things that just wasn't going to work out," says Gray, who used his G.I. Bill benefits to take classes at the University of Phoenix while he cast about for his next idea.

Through those classes, Gray met Damon Baker, a Marine veteran who was working on mobile location-based software that would give businesses individual information about customers before they came in the door. Take Starbucks, where Baker got his coffee every day: Wouldn't it be great if his local baristas could get an alert as his smartphone approached the store, and brought his coffee out to his car when he showed up?

Baker hated selling, but Gray was game. They quickly landed meetings with a university, a marketing company, and a casino operator--though that success brought new problems. Every potential client wanted some tweak, and Gray and Baker would change the demo to accommodate them. "We would see shiny little balls and chase them down, and put together a demo for that," says Gray. "Then more shiny little balls."

The requests were more than Baker and Gray could handle, and they had to learn a new industry each time one came in. The frenzied pace meant that one demo "flat out did not work in the actual meeting itself," says Gray. "There were a few times when I left the office after some big losses, when walking home I just thought to myself, 'Man, this could be it.' "

Finally, Gray and Baker, whose Denver-based company is now called HyprLoco, realized they needed to focus, fast, on one industry, and learn it inside and out. Their choice? Quick-service and fast-casual restaurants--just what Baker had been thinking about as he dreamed of a faster cup of coffee. The founders managed to raise a seed round of $1.4 million, and now they have a team of 17. Earlier this year, they signed a contract with Sync3, a quick-service restaurant technology provider that's using HyprLoco at about 30 franchise chains.

While Gray continues to manage his PTSD, doing so while being his own boss removes at least some of the stress it could create in his professional life. He's even learned, in true entrepreneurial fashion, to make it a strength.

"I'm 100 percent confident that, in some cases, people have not invested in me because of, let's call it the risk factor," he says. "Others appreciate the story: This guy could have ended up as a statistic or in prison, but he's overcome these hurdles to be in the position he's in today."

Fighting hidden battles

Work travel may have saved Tabatha Turman's life abroad--and nearly ruined it at home. A finance commander deployed to Iraq in 2004, Turman was sent on a mission to Kuwait. She returned to find that a shell had put a hole in the floor of her Baghdad office.

For the next few months, Turman ran the finance office from her bedroom, where her work was frequently interrupted by loud attacks on the infantry and artillery elsewhere on the base. Not that leaving the base was much of a reprieve; when Turman went out to pay people, her team needed armed escorts.

In 2005, Turman came home to northern Virginia to a more quietly shattering reception: Her youngest child, just 2 years old when she left, didn't recognize her. "You didn't have Facetime in 2004," she says. "I was devastated."

She resigned her active-duty commission, rejoined the reserves, and went to work for the Army as a civilian. "I still felt like I was in the fight," says Turman, who has a cautious smile but the poise of a TV anchor. "I just put on a suit and I kept fighting."

"Other than the shooting, everything about being an entrepreneur is just like the chaos of combat."

After 18 months, her civilian job turned out to have one important thing in common with her military role: She wasn't seeing her kids nearly enough. So Turman decided to start up her own accounting firm in her house, doing taxes and helping companies set up their accounting.

She describes that period as "comfortable," but clearly craved something bigger. "I didn't have many customers or clients, and I'd given the military all this time," says Turman, who had been a reservist for 11 years before beginning active duty in 1999. A workshop got her into government contracting, and soon Turman was bringing in financial and accounting gigs through the connections she'd forged during almost 20 years of military service. "It was just about not turning down what was right in front of me," she says.

Like many entrepreneurs, Turman has found hiring to be a constant challenge--complicated by the requirements of government contracting. "I had some bad hires, because I had to get them where I could," she says.

She eventually narrowed her search to people who already had security clearances, and now her company does its own background checks. Turman has gone out of her way to boost the quality (and veteran quantity) of her hires: She uses trained recruiters to attract workers who might otherwise go to larger firms, bumped up her benefits package, and instituted an employee referral program. Integrated Finance and Accounting Solutions, her Woodbridge, Virginia-based company, currently employs about 100 people, including about 50 veterans and military spouses.

All that hiring has brought Turman about $14 million in annual revenue--and the flexibility that she and many other entrepreneurs value just as much as their bottom line. As a successful founder, Turman can control her schedule, putting her kids' sports games on her business calendar and going on family vacations, even if she has to work a bit or show up a day late.

Nine years after starting her business, Turman also knows exactly what her employees are going through on their worst days--and can create the conditions for the post-Iraq recovery they, and she, need. "Crowds are hard," she says. "When you are deployed, there's the paranoia. You are always vigilant. Now it comes and goes." When she has a rough day, she doesn't need to explain it to anyone, she says: "I can go in a room, I can take a break. You create your own environment being self-employed."

That's advice Turman gives to other veterans, but which resonates for anyone dreaming of starting a business.

"Don't listen to people's stories about their roadblocks," Turman says. "Just go for it. If you put in that same work ethic you had in the military, it will pay off."

From the October 2016 issue of Inc. magazine