The doubts crowded in late at night, after the kids were in bed and the dishes were put away.

In the months after she got her deployment orders, Navy cryptologist Shannon Kent spent her days preparing to join a Special Operations task force in Syria battling the Islamic State. For Shannon, the mission was the culmination of a 15-year military career: language exams, fitness tests, repeated deployments alongside Navy SEALs.

And yet, after four stints in Iraq and Afghanistan, she had thought those deployments, pursuing extremist leaders, were behind her. Her younger son was now barely a year old. Her 3-year-old, Colt, was just old enough to know that a war was taking his mother away. "Momma no fight bad guys," he told her.

Late into the evening, Shannon and her husband, Joe, who had completed 11 combat deployments as a Green Beret, quietly discussed the bleak possibilities that were a routine feature of their world. Wills. Funeral preferences. Military friends who had been killed. Their life together was interwoven with the United States' seemingly endless wars.

As the departure date grew near, Shannon was alternately energized and so anxious she felt sick. How would the boys cope for six months without her? What if the worst happened?

On Jan. 16, Shannon texted Joe from Syria, letting him know she would be out on a mission. The city of Manbij had mostly been quiet since militants were pushed out by Kurdish forces who worked closely with the United States. But like anywhere in Syria, Americans were a target. Shannon and her colleagues often went out for several days at a time, sleeping in their trucks as they met locals and gathered intelligence. They dressed in civilian clothes, hoping to avoid attention.

"I love you," Joe responded. "Text me when you're back."

- - -

The Islamic State was watching as Shannon and a small team of Americans slipped into a bright kebab restaurant off a bustling street. It was a favorite haunt of Americans in the city. A man hiding a suicide vest under his dark clothing pushed past people on the sidewalk.

Within seconds, a fireball swept through the dining room, blowing out the restaurant's front entrance and scorching people walking by outside.

Shannon and three other Americans were killed - the deadliest attack on U.S. forces in the campaign against the Islamic State. She became the first female service member to die in combat in that conflict, shining a light on the mostly invisible role of women in the shadowy, testosterone-filled world of Special Operations.

Shannon's path to Syria, Special Operations and that last mission in Manbij began in a small New York town where she sought out connections to the wider world. The daughter of a teacher and a state trooper, she had a knack for languages. Her father and an uncle, a Staten Island firefighter, were first responders on Sept. 11, 2001. Those events inspired Shannon to enlist in 2003.

In the Navy, Shannon qualified to specialize in the most challenging languages. She chose Arabic because she wanted to be at the tip of the spear of the 9/11 response.

Right away, Shannon began banging on doors to get overseas. In 2007, she landed a spot on a team supporting Navy SEALs who conducted nightly raids in Iraq. She used her Arabic skills to pull together intelligence on terrorism suspects and went out on a few SEAL operations. Women were just starting to be included in Special Operations missions as male troops encountered resistance to interactions with local women.

After that deployment, she was asked to try out for a permanent position on a SEAL support team. In 2008, Shannon, 5-foot-8 and 125 pounds, found herself pounding down a Virginia beach in full body armor, training for the next fight. In 2012, she was sent to rural Afghanistan to support a SEAL team. It was a rough deployment; her team lost multiple people.

Slowly, Shannon told family and friends, she was starting to earn the respect she craved. Working in the heady world of special operators, the value of a cryptologist - part linguist, part intelligence analyst - wasn't always obvious.

"She didn't have the title. She couldn't say 'I'm a Navy SEAL' or 'I'm a Green Beret,' " her sister, Mariah Smith, said.

Especially in the initial years after 9/11, women faced a lot of skepticism on those teams. Shannon began working alongside SEALs nearly a decade before the Pentagon opened all combat roles, including Special Operations jobs, to female troops. In an era of insurgent conflicts without front lines, women like Shannon were already a repudiation of notions that female service members weren't exposed to combat.

"That she put herself in the most competitive environment for a woman really speaks to her need to overachieve and prove to other people that she's good enough," said Sharron Kearney, her cousin.

As the years passed, Shannon felt frustrated at having to validate herself over and over. She thought about trying out for Army Special Forces to secure a credential that would telegraph her worth. But as she reached the upper enlisted ranks, it didn't make much sense to start over.

- - -

In 2013, Shannon returned from Afghanistan. President Barack Obama, hoping to curtail the country's costly counterterrorism wars, had pulled U.S. troops from Iraq in 2011 and was moving to reduce the force in Afghanistan.

A friend set Shannon up with a Green Beret who also was training at Fort Belvoir, Virginia. Like Shannon, Joe Kent's adult life had been defined by insurgent conflicts. He had grown up in Oregon, the son of self-described "dropout hippies" who tried to keep their kids away from sugar, TV and toy guns. Joe, from an early age, would fashion weapons out of Legos. He was going to be a soldier.

Joe and Shannon were married the following Christmas Eve. They bought a house overlooking Maryland's Severn River, with a deep yard that would be great for kids. Shannon planted an herb garden. Inside the house, she used seashells and shards of glass to make a mosaic depicting marching soldiers. On the wall, mementos from Joe's deployments to Yemen and Fallujah, Iraq, were positioned alongside language awards and Shannon's Afghanistan photos - artifacts of their military histories.

In 2014, Islamic State militants rolled across Iraq and Syria, pulling the Pentagon back onto a war footing. Joe soon headed off on two more Iraq deployments. He missed both of Shannon's pregnancies but was home for the birth of Colt in 2015 and Josh in 2017. They gave both children middle names after colleagues killed in action.

Joe, approaching 40 and now a father, decided it was time to end 17 years of continual deployments and put in his retirement papers in 2018.

Now stationed at nearby Fort Meade, Shannon began to think differently about her own professional path. She was committed to progressing in the Navy. Shortly after Josh was born, she bundled Colt into a hiking backpack and took him out into the woods so she could train for a 50-mile military orienteering event. At night, she kept up her Arabic. Between her pregnancies, she began a master's in military psychology, drawn to exploring the post-traumatic stress disorder and other effects of repeated deployments that she and Joe had seen in so many friends.

But motherhood changed her perspective. She wanted to be there when the boys woke up in the middle of the night, she said.

Shannon eventually identified a potential solution: the military's doctoral program for clinical psychology. She and Joe saw it as an honorable way for her to avoid combat while using her experience to assist military peers.

- - -

In March 2018, Shannon was elated to learn she had secured one of 10 active-duty slots for the program. But there was a problem. Between her pregnancies, she had gotten a diagnosis of thyroid cancer. She matter-of-factly informed Joe, who was deployed at the time, by text only after she had emergency throat surgery to remove a growth. The cancer was caught early and left no lasting health effects, her doctors said. She had to be commissioned as an officer to enter the doctoral program, and doing so required the same clean bill of health that anyone joining the military for the first time must have. But the Navy determined the cancer made her medically unfit. She applied for a waiver and was denied.

Meanwhile, Shannon's home duty was coming to an end, and she was on a shortlist of people with needed skills. In the spring of 2018, even as she appealed the Navy's decision, she began predeployment training: refreshers in firearms, combat driving, first aid.

"I tried to do the officer program so I would be in school for the next five years, home with the babies every night," she texted her cousin Sharron. "But of course the Navy said, 'F--- you.' "

Shannon and Joe sought congressional help, and several lawmakers petitioned on her behalf. The Navy did not budge. She was healthy enough to stay in but not to become an officer.

Shannon tried to remain positive. She set her sights not just on securing entry into the doctoral program - she hoped to get a waiver the following year - but on changing the Navy's commissioning standard so others wouldn't face the same obstacle. Still, "it was a gut punch," her cousin said.

"I never minded before," Shannon texted Sharron about deploying. "Now I feel sick to my stomach every day."

- - -

Shannon Kent's husband, Joe, is a former Green Beret, seen with their sons at their Maryland home. Photos for The Washington Post by Jared SoaresThe Washington Post

To prepare the boys, Shannon played them a cartoon song called “Grownups Come Back.” In the summer and fall, she went away for several short predeployment trainings, a good way for the kids to get used to her absence. She looked for children’s books about moms being deployed, but most seemed to be about dads.

With 15 years in, Shannon might have found a way out of the deployment, by seeing a psychologist or volunteering for additional shore duty. She couldn't bring herself to do it.

"She would say, 'Every part of my DNA is telling me don't do this, it's wrong,' " Joe said. "She said, 'At the same time, my conscience and what I feel like has propelled me through my entire adult life is telling me I have to go on this deployment because it's my turn.' "

Joe and Shannon figured the odds were that she would be fine. This wasn't Iraq of 2007, when Americans were blown up every day. In Syria, U.S. forces were primarily operating in areas cleared of militants. But a smaller team meant operating "without a net," without the same backup, as Joe put it. Anything was possible. "It's like, how many times can you roll the dice?" Joe said.

After two pregnancies and five years without a combat deployment, Shannon also felt compelled to reestablish her combat credentials. As her departure approached, she focused on the exhilaration she would feel working on the front lines and the satisfaction of being part of a challenging mission, friends and family said.

In November 2018, Joe and Shannon left the boys with Joe's parents and drove to Fort Bragg in North Carolina for her flight to the Middle East. Joe described the trip down as a roller coaster. "She's a strong woman who's very capable of compartmentalizing her emotions," he said. But she was deeply conflicted. "Is this the last time I'm going to see the kids?" she asked.

In Syria, Shannon spent time operating out of a network of small bases that U.S. forces maintained in the country's northeast. Her mission was to pull together intelligence that special operators could use for raids or strikes on "high-value targets." While the Pentagon had decimated the Islamic State's fighting power, its top leaders remained at large.

Shannon told family and friends little about her work. She said the small U.S. footprint made it unlike the Iraq War, during which many troops operated out of massive bases. But she admired the female Syrian fighters she worked with. She made connections with colleagues. For a Secret Santa gift swap, she made a mosaic out of spent shell casings.

Their mission continued even after President Donald Trump suddenly announced in December that the enemy had been defeated and U.S. forces would be coming home, a move senior military officials feared might squander the gains made by U.S. troops there.

It was around midday on Jan. 16 when Shannon's team moved through a busy market area in central Manbij. Stepping past butcher cases and columns of shawarma meat, they entered the Palace of Princes. In the previous months, a series of high-profile Americans - senators, a senior Pentagon official, a four-star general - had stopped in the restaurant. The choreographed visits were publicized as proof of how far the city had come.

The suicide blast killed three other Americans: Jonathan Farmer, a Green Beret; Scott Wirtz, a civilian intelligence officer; and Ghadir Taher, a Syrian-born contractor who had returned to her home country to interpret for the U.S. military.

Joe got word from a friend that it appeared at least one woman had been hit in a bombing in Manbij. Home in Maryland, he told himself it wasn't necessarily Shannon. There were other women on her team. "But the timing of when we talked last . . ." he thought. The official call came less than an hour later.

- - -

Joe Kent wears a memorial bracelet in honor of a teammate who died in Iraq in 2005. Photo for The Washington Post by Jared SoaresThe Washington Post

In the weeks following Shannon’s death, family and friends flooded in for a memorial at the Naval Academy, the burial at Arlington Cemetery in Virginia, a service at Fort Meade in Maryland. People dropped off meals and sent checks. Joe, who had expected to look for overseas work after leaving the military, began to rethink his employment plans.

What should they tell the boys? They were already used to their mom being away, and too young to understand what had happened. Joe consulted several child psychologists. Most of the advice seemed tailored toward instances in which military fathers, not mothers, didn't come home.

Sometimes the kids asked to FaceTime with their mom. Not now, Joe replied, she's busy. Josh, now 20 months, called Shannon's sister Momma a few times. It shook her. "After he said it, his little eyebrows furrowed, and he looked at me like, wait, that's not right," Mariah said.

Colt is particularly attached to his paternal grandmother, Mary Kent, and scans the room when she's out of sight. "We're like, okay, we have to live another 30 years. Take your vitamins," Mary said.

Some family members are angry at the military for telling Shannon she wasn't healthy enough to enter the doctoral program even as it sent her to Syria. In May 2018, as she was fighting the medical disqualification, Shannon had been rated "outstanding" on a predeployment fitness test.

"Losing Shannon is excruciating," Shannon's mother, Mary Plover-Smith, said. "Knowing that she should have been sitting in a classroom is almost unbearable."

- - -

Joe Kent walks alone in his yard in Maryland, where his late wife, Shannon Kent, had planted an herb garden. Photo for The Washington Post by Jared SoaresThe Washington Post

The Navy, acknowledging mistakes in handling Shannon’s case, quickly took steps to improve the process for considering waiver requests, resulting in an initial increase in approvals of 15 percent. A group of senators has appealed to the Pentagon’s leadership to consider additional changes affecting people in similar situations across the military.

Joe began to wonder how his own military identity might have affected what Shannon told him before she left. He started to think differently about the late nights she spent working on her mosaics or in the garden.

"Some of that was just how she was, but a lot of it was her dealing with the anxiety of the upcoming deploy, because she wouldn't share that anxiety with me," he said. "She wanted to embody the warrior ethos that I preached."

"Shannon was always striving to prove herself," he said. "Even to me."

A few weeks after Shannon's death, Joe and his parents bustled around the kitchen, settling the boys into their chairs for lunch after Josh woke up from his morning nap. Copper pots and pacifiers hang from the cabinets; on the refrigerator, family photos are held in place by a Wounded Warriors magnet. Perched on a shelf over the boys' shoulders is a hand-drawn portrait of Shannon, which a veterans group sent Joe as a tribute. When Josh first saw the drawing, Joe said, he pointed at it and said, "Momma!"

Joe's mother said the situation was especially bitter given the relief she felt just last year at Joe's retirement. For so long she had feared a knock on the door. When her daughter-in-law left this time, Mary Kent said, it didn't even occur to her that Shannon might not be back.

"I thought we had dodged that whole thing," she said. "They had come home so many times that it was just like, she'll come home. Of course she'll come home."

Mary and Joe bundled the boys into jackets and rubber boots to get some air. Under a clear, cold winter sky, Colt darted down a path in the garden, trailed in the yard by his little brother. Protruding from the frozen ground were labels for the vegetables their mother had planted.

Joe wasn’t sure what would become of the garden. It was Shannon’s thing.