The Canadian lawyer for Philip Halliday said the Digby man was freed as a result of a written decision handed down in Madrid.
Kevin Burke said he was awaiting translation of Spanish court documents but assumed his client was released because of time already served.
"They've obviously taken that into consideration, but until I have an opportunity of looking at the judgment itself, it would appear that they felt there was no further need to have Mr. Halliday incarcerated."
Burke said Halliday was to be picked up by Canadian embassy officials before further arrangements were made to return him to Canada.
"There are still some matters to be cleared up, but I would anticipate that Mr. Halliday would be on his way home very shortly, said Burke.
Halliday, 56, was a crewman aboard the Destiny Empress and had been held by authorities since the vessel was apprehended off the coast of Spain on Dec. 21, 2009.
Police said they found 1.5 tonnes of cocaine aboard the boat, but Halliday maintained his innocence, saying he had no idea there were drugs on board.
Burke said his client's Spanish lawyers have advised there are grounds for an appeal of the guilty verdict, but no decision has been made on whether to proceed.
"They have in very strong terms recommended an appeal," said Burke. "In their view, there was really no basis to enter a conviction."