Two men were arrested on felony drug charges Tuesday as they were stepping off the ferry in Vineyard Haven.

The Martha’s Vineyard Drug Task Force, working in conjunction with the Tisbury and Massachusetts State Police, arrested Jose Luis Arais, 21, of Jamaica Plain, and Wilken Ariaz Baez, 27. Both men were charged with trafficking class A heroin, trafficking class B cocaine and conspiracy.

Mr. Baez initially provided a false identification to police; police learned his true identity after running his fingerprints through the FBI database.

Mr. Baez also was charged with providing a false name to a police officer.

Police seized 105 grams of heroin and 79 grams of cocaine, with an estimated street value of around $28,000, as well as approximately $1,760 in cash.

The men were arrested after they arrived on the 12:45 p.m. boat and got into a taxicab. Police told the Gazette that as officers approached the cab, the two men threw the drugs onto the floor of the vehicle.

Mr. Arais and Mr. Baez, both originally from the Dominican Republic, are being held on bail. Both men are scheduled to be arraigned in Edgartown District Court on Thursday morning.

State police Sgt. Jeff Stone, also head of the Martha’s Vineyard Drug Task Force, said the arrests were the culmination of a nearly year-long investigation. He said police were tracking the men’s movements and knew they were likely holding drugs when they arrived on the boat.

“We knew these guys were coming to the Island and selling heroin, we were just waiting for the right time and place. We knew they would be arriving on this boat, and we knew they would be carrying [heroin],” he said.