Updated

NASCAR reinstated A.J. Allmendinger on Tuesday, saying the driver had successfully completed its rehabilitation program after testing positive for a banned substance.

Allmendinger was suspended two months ago after failing a random drug test in June and his backup "B'' urine sample later tested positive. NASCAR has not revealed the substance, but he has said he tested positive for Adderall, a prescription drug typically used to treat attention deficit disorder. He does not have an ADD diagnosis or prescription, and said he took it a couple of days before the June 30 race at Kentucky Speedway because he was tired.

"The Road to Recovery program was really helpful to me in getting my priorities reset away from the race track," Allmendinger said in a statement. "And, honestly, that helped find my love of racing again and why I began racing in the first place. I'm looking forward to taking this experience and be better for it moving forward."

Allmendinger was suspended July 7, just hours before the race at Daytona and forcing Penske Racing to bring in Sam Hornish Jr. at the last moment. Allmendinger was released by Penske Racing after the "B'' sample failed and the only way to come back to the series was to complete NASCAR's "Road to Recovery" program.

Now that he's done it, he may find a home sooner than anyone expected back in July.

Team owner Roger Penske had Allmendinger as his guest at the IndyCar season finale last weekend and said the 30-year-old driver is a viable candidate for rides in both NASCAR and IndyCar. Penske said he'd consider hiring Allmendinger again.

Allmendinger was hired in late December by Penske to fill the seat that opened when Kurt Busch split with the organization. It was the most prolific ride of Allmendinger's career, and both driver and team seemed thrilled with the pairing even as Allmendinger struggled at times in the No. 22 Dodge. He was 23rd in the Sprint Cup Series standings heading into Daytona, where he won the Rolex 24 Hours of Daytona sports car race in January.

The July suspension came at a time when Penske was evaluating picking up the option on Allmendinger for 2013. Hornish filled in for Allmendinger, but Joey Logano was hired to drive the car next season.

The next step for Allmendinger may be up to owners like Penske.

"He could be an option for us, for sure," Penske said before the IndyCar finale at Auto Club Speedway on Saturday. "He's someone we would consider."

Allmendinger spent three seasons in Champ Car, and won five races in 2006 before moving to NASCAR.

"This is a speed bump in his career, but he's certainly an option for people on the NASCAR side and the Indy side," Penske said.

Penske doesn't have an open seat in NASCAR, and it's not clear what will happen with his third IndyCar team. He's already picked up the 2013 options on Will Power and Helio Castroneves, but has told Ryan Briscoe he's free to look around while the team tries to secure sponsorship for that seat.

Allmendinger was the second Sprint Cup Series driver suspended under NASCAR's tightened drug policy implemented in 2009. Jeremy Mayfield was the first and he unsuccessfully sued to have the results overturned. Court documents showed that Mayfield tested positive for methamphetamine.

In 2009, Allmendinger pleaded no contest in North Carolina to a misdemeanor charge of driving while impaired. He was given a 60-day suspended sentence, 18 months unsupervised probation and 24 hours of community service. Allmendinger drove for Richard Petty Motorsports at the time, and the team put him on probation through 2010 and fined him $10,000.