Former Pentagon chief and Marine general Jim Mattis told an audience in Washington, D.C., about the mistakes he made as a wayward youth and during the Gulf War.

"I went to jail twice — twice — before I went into the Marines," Mattis said at a book tour event on Friday. "And I would just tell you, the Marines forgave that, too."

Growing up in central Washington state, Mattis was born into a family that loved the outdoors and gave him a long leash to explore the world around him. At 13, he was hitch-hiking across the country and got into a few scrapes along the way.

In his book, Call Sign Chaos, he recalled getting into a fight with three local boys in Montana. The young Mattis would eventually be picked up by a local sheriff who gave him a cell to sleep in for the night before driving him to a rail yard to hop a freight train the next morning.

Though Mattis is hailed for his love for reading and learning today, he admitted he was not much of a student as a young man, preferring parties to his studies at Central Washington State College. After a particularly rambunctious night, a judge sentenced Mattis to spend weekends in jail. It was there that a fellow inmate taught him the value of mindset and choices. When looking out the cell window, he told the fellow inmate he saw a muddy parking lot, but the inmate, lying on a bunk, said he saw stars.

"It's your choice. You can look at stars or mud," the inmate said.

The point was that you can't always control your circumstances, but you can control how you respond. Afterward, Mattis did odd jobs around the jail to get out early.

Even after cleaning up his act and joining the Marines in 1972, Mattis admitted he still made mistakes. He recalled one example in which he was running through an obstacle course during training, where it was clear he wasn't giving it his all.

A grizzled gunnery sergeant took notice, chastising the young Mattis and calling him a "communist."

"Let me make it clear to you, young man," the sergeant told Mattis. "When you give 100%, I'll be 100% satisfied. You give 99%, I'll be 100% dissatisfied."

Mattis replicated this kind of expectation as a leader. After being assigned to a command recruiting station early in his career, one of his subordinates complained about the long hours and workload he was assigned. Mattis made it clear that to the man that he could be a Marine, or a quitter, but not both. He would ultimately end the man's career.

"Just remember that even Jesus of Nazareth had one of 12 go to crap on him," Mattis joked.

Despite these high expectations, Mattis said he understands mistakes can always be made. He admitted his greatest error came in the prime of his combat career, leading a battalion of 1,250 troops during the Gulf War.

"We're going through minefields, and in the middle of the open desert, I get my battalion surrounded," he said. "OK, that's almost impossible."

Instead of getting chewed out for the mistake back at base, his colonel asked him if he learned something that day. Mattis responded, "Yes, sir," and the colonel replied, "OK." He wanted to make sure that Mattis understood the severity of the mistake, but also wanted to help him work through it.

"The Marine Corps doesn't mind you making mistakes. I made a lot of mistakes, got chewed out. And the Marine Corps doesn't look out for your ego or anything when they go after you. But they promoted me every time I made a mistake," Mattis said. "They expected me to study, but they didn't expect me not to make mistakes."

The important thing, according to Mattis, is knowing the difference between a mistake and a lack of self-discipline. The former can be forgiven, the latter is up to the individual.