AUSTIN — Call it decriminalization with a catch.

Legislation to decriminalize the possession of an ounce or less of marijuana will be modified to keep the offense criminal, but with a near automatic expunging of any criminal record if the person with the substance completes probation.

State Rep. Joe Moody, the El Paso Democrat who authored House Bill 63, filed a rewrite of the legislation Wednesday afternoon ahead of the scheduled floor debate on Thursday.

"Without leaving some criminal (component) in it, I probably couldn't get the bill through the process and across the governor's desk," Moody said. "I didn't want to come this far and make perfect the enemy of good."

Moody is making his third attempt to remove the criminal stigma that comes with someone being convicted of having a small amount of marijuana. His attempts to modify the law in 2015 and in 2017 stalled and his legislation never made it to the House floor for a vote.

This year, Moody was able to draw bipartisan support for his bill. But several law enforcement organizations have lobbied both publicly and behind the scenes to keep a marijuana possession in the criminal column.

By offering the rewritten version, which states that officers who encounter people with an ounce or less issue citations but not make arrests, Moody is seeking to mollify opponents who fear it might lead to full legalization of marijuana.

The legislation would also eliminate any criminal record for someone who had not "received a deferral of disposition" for possession of an ounce or less during the previous 12 months.

Instead, the offender could enter a guilty or a no-contest plea and receive probation. Upon completion, the judge in the case would be required to "order all documents related to the offense to be expunged from the person's record."

"The dismissed complaint is not a conviction and may not be used against the person for any purpose," the rewritten legislation says.

The bill also would eliminate the loss of a driver's license for someone caught with an ounce or less of marijuana. And it also makes the process for adjudicating someone caught with marijuana paraphernalia the same as someone caught with an ounce or less of marijuana.

During the floor debate on Thursday, more amendments might be offered and voted on. If the House passes the bill, one more vote would still be required before sending the measure to the Senate for consideration.

John C. Moritz covers Texas government and politics for the USA Today Network in Austin. Contact him at jmoritz@gannett.com and follow him on Twitter @JohnnieMo.