OTTAWA — Mayor Rob Ford of Toronto has long been dogged by controversy over his often boorish behavior and less than diligent attention to work. On Friday, Mr. Ford faced his greatest political test following two reports that he is seen in a video apparently using crack cocaine.The Toronto Star and the Web site Gawker reported on Thursday night that they were shown the video on a smartphone by two men who were trying to sell it. The Star, which said that two of its reporters had watched the recording, reported that it was made by a man who said he had sold crack to Mr. Ford.

Mr. Ford called the accusations of crack use “ridiculous.”

The Star report said that the 90-second video shows Mr. Ford inhaling from what appears to be a glass crack pipe. At one point, the newspaper said, Mr. Ford, a Conservative, is heard making vulgar remarks about Justin Trudeau, the newly elected leader of the federal Liberal Party.

An intermediary for the video’s creators also gave Gawker and The Star a photograph of Mr. Ford posing with two men, one of whom appears to be a person later killed in what the police characterized as drug-related gang violence. Toronto has been afflicted with a number of recent killings that the police have linked to the drug trade.

While the episode appears to mirror the scandal that brought down Mayor Marion S. Barry Jr. of Washington in 1990, there are major differences. The videotape of Mr. Barry smoking crack in a hotel room came from law-enforcement surveillance.