We affirm in open court the order of Judge Murphy in the Southern District of New York which denied Gaines’ motion pursuant to 28 U.S.C. § 2255 to receive credit against his federal sentence for time spent in pretrial state custody after he was sentenced by Judge Murphy to two years imprisonment on June 20, 1968 following his plea of guilty to illegally possessing and dispensing a narcotic drug.
On January 9, 1968, Gaines was arrested by New York State authorities *1070and charged with robbery and murder. He was held without bail until April 8, 1968, and released when a grand jury failed to indict him. On May 16, 1968, Gaines pleaded guilty to the federal charge. The state authorities rearrested him on June 1, 1968 on the same robbery and murder charge. There he remained until release on April 1, 1970, except when he was produced for sentencing in the Southern District on a writ of habeas corpus ad prosequendum. The state authorities arrested other persons believed to be responsible for the murder and robbery, and all state charges against Gaines were dropped on May 1, 1970. Upon being released by the state authorities, Gaines immediately commenced service of his federal sentence.
Gaines contends that the time spent in state custody should be credited to his federal sentence. If this contention were well-founded, he would be entitled to immediate release. We are sympathetic to Gaines’ plight, but we see no legal basis to justify relief.1 After sentencing, petitioner was returned to state authorities pursuant to the terms of the writ. Thus, the state detention facility plainly was never designated as the place for Gaines to commence serving his sentence. The relevant statute, 18 U.S.C. § 3568, provides only that the “Attorney General shall give any such person credit toward service of his sentence for any days spent in custody in connection with the offense or acts for which sentence was imposed.” The state robbery and murder charges were unrelated to Gaines’ narcotics conviction. The statute is unambiguous in not allowing credit for an unrelated offense. Petitioner urges us to apply New York law, which would give such credit, but we think that only federal law can govern the terms of a federal sentence.
We find no merit in Gaines’ other contentions that he was denied equal protection and due process. Arguments similar to those presented here were rejected in Matter of Nelson, 434 F.2d 748 (8th Cir. Dec. 1, 1970), and Green v. United States, 334 F.2d 733 (1st Cir. 1964), cert. denied, 380 U.S. 980, 85 S.Ct. 1345, 14 L.Ed.2d 274 (1965).
Affirmed.