Let G = A ★ H B be the generalized free product of the groups A and B with the amalgamated subgroup H . Also, let λ ( G ) and ψ ( G ) represent the lower near Frattini subgroup and the near Frattini subgroup of G , respectively. If G is finitely generated and residually finite, then we show that ψ ( G ) ≤ H , provided H satisfies a nontrivial identical relation. Also, we prove that if G is residually finite, then λ ( G ) ≤ H , provided: (i) H satisfies a nontrivial identical relation and A , B possess proper subgroups A 1 , B 1 of finite index containing H ; (ii) neither A nor B lies in the variety generated by H ; (iii) H < A 1 ≤ A and H < B 1 ≤ B , where A 1 and B 1 each satisfies a nontrivial identical relation; (iv) H is nilpotent.