The cab driver accused of shooting and wounding an Alexandria police officer in Old Town last year was again ruled competent to stand trial Thursday — the second time a judge has decided the man’s competency has been restored by psychological treatment.

Whether 27-year-old Kashif Bashir, who is charged with attempted capital murder of a police officer in the February 2013 shooting of Officer Peter Laboy, will remain that way is perhaps more tenuous. A doctor testified that Bashir — who once heard voices and believed people could read his thoughts — likely has residual symptoms, and Bashir’s defense attorney warned that moving him out of a hospital and to jail might worsen his condition.

For now, though, Alexandria Circuit Court Judge James C. Clark ruled that Bashir can understand the legal proceedings and thus is “clearly competent to stand trial.” Clark said he was moved in particular by the advice of medical professionals. Ted Simpson, a forensic evaluator at Central State Hospital, testified Thursday that Bashir was able to understand the case and “eager to proceed.”

Prosecutors allege that Bashir shot Laboy in the head seemingly at random last year, after the motorcycle officer pulled him over to investigate a report that Bashir had been acting strangely. Laboy survived but has endured an arduous recovery, and it is unlikely he will be able to return to police work.

Laboy, who watched the proceedings Thursday with his wife, Suzanne, said afterward that it “feels better” that the case is again moving forward. Suzanne Laboy said she and her husband were keeping their enthusiasm in check, noting that Laboy had previously been declared competent, only to have that declaration reversed later.

“It would be nice to have a little bit of closure,” Suzanne Laboy said.

Prosecutors and defense attorneys said they were discussing a trial date at the end of September, though they did not formalize that Thursday. Emily Beckman, Bashir’s defense attorney, hinted that she was exploring an insanity defense and asked the judge to approve funds to help her analyze Bashir’s computer for that purpose.

Bashir will now head back to Central State Hospital, and prosecutors and defense attorneys said that they were working out an arrangement to keep him there, rather than send him to jail in Arlington County.

Get updates on your area delivered via e-mail