
128 N.J. Super. 488 (1974)
320 A.2d 514
STATE OF NEW JERSEY, PLAINTIFF-RESPONDENT,
v.
JAMES EARL BEATTY, DEFENDANT-APPELLANT.
Superior Court of New Jersey, Appellate Division.
Submitted May 21, 1974.
Decided May 30, 1974.
*489 Before Judges HALPERN, MATTHEWS and BISCHOFF.
Mr. Stanley C. Van Ness, Public Defender, attorney for appellant (Mr. William E. Norris, Assistant Deputy Public Defender, of counsel and on the brief).
Mr. Karl Asch, Union County Prosecutor, attorney for respondent (Mr. Thomas P. Simon, Assistant Prosecutor, on the brief).
*490 PER CURIAM.
Defendant pleaded guilty to two counts of an indictment charging robbery, in violation of N.J.S.A. 2A:141-1, of two individuals at the same time and place, and two counts of an indictment charging him with being armed in perpetrating the robberies, in violation of N.J.S.A. 2A:151-5. He was sentenced to seven to ten years on the first count, concurrent with sentences then being served, and given lesser terms on the other counts, all concurrent with that imposed on count 1.
Defendant argues first that the sentence is excessive. The sentence is well within the statutory limits. The serious nature of the crime, as well as defendant's past criminal record, fully justify the sentence imposed. We see no abuse of discretion.
Defendant next contends he is entitled to receive credit for time spent in a New York jail while awaiting transfer to New Jersey, citing R. 3:21-8 which provides:
The defendant shall receive credit on the term of a custodial sentence for any time he has served in custody in jail or in a state hospital between his arrest and the imposition of sentence.
The facts upon which defendant bases this claim are briefly as follows. He was indicted for the present offenses by the Union County grand jury on June 18, 1970. At the time of the indictment he had been arrested on charges in the State of New York. He was sentenced to a New York penal institution for a term, where the latest release date was September 11, 1971. At the time of his conviction in New York defendant was in violation of parole in New Jersey and a detainer based on that violation was lodged with New York authorities in July 1971. He was returned to a New Jersey penal institution on February 24, 1972, following extradition. He was then released on habeas corpus to Union County where he pleaded guilty to the charges above noted and the present sentences were imposed.
Defendant contends he is entitled to receive credit for the 166 days he spent in the New York penal institution from *491 September 11, 1971 to February 24, 1972, as a result of the detainer filed with New York authorities by New Jersey authorities.
The State argues that (a) R. 3:21-8 applies only to time spent in custody in New Jersey; (b) since the detainer was for violation of parole and not the result of the robbery charges, defendant is not entitled to credit on the sentence for robbery, and (c) the Uniform Interstate Detainer Act (N.J.S.A. 2A:159A-1 et seq.) makes no provisions for credit to be given in a similar situation, and defendant is accordingly not entitled to it.
We disagree. R. 3:21-8 expresses the public policy of the State and should be liberally construed. Defendant was detained in a New York institution because of action taken by New Jersey, and whether that action finds its source in the robbery charge or the violation of parole charge is in our view immaterial. We accordingly hold that defendant is entitled to receive credit against his sentences for the 166 days that he was detained in the New York penal institution.
The sentences are accordingly modified to provide for this credit and they are, in all other respects, affirmed.
