ISLAMABAD, PAKISTAN, JAN. 4 -- A French journalist who entered Afghanistan with Moslem rebels was sentenced by an Afghan court today to 10 years in jail for spying, and France immediately demanded his release.

The official Kabul radio, monitored here, said Alain Guillo, 45, was convicted of collecting military secrets and of activities harming the interests of the Afghan government. The journalist was sentenced by a revolutionary court in Kabul with a French consular official in attendance.

The French Foreign Ministry in Paris denounced Guillo's conviction and called on Moscow to secure his immediate release. "French authorities can only express surprise and reprobation at the conditions under which Mr. Guillo was charged with spying and convicted," it said, noting that he was tried without his lawyer being allowed to go to Kabul.

"France demands that the Soviet authorities use their influence to free this journalist as soon as possible."

Guillo was captured in the northeastern province of Faryab on Sept. 12, when a guerrilla leader handed him over to the Kabul authorities, according to a Soviet newspaper.

He was one of scores of western reporters and photographers who have crossed into Afghanistan with the anti-Soviet rebels to report on the nine-year-old guerrilla war.

Kabul Radio said evidence of his espionage activities consisted of video and audiocassette tapes, maps and documents showing that he collected military information.