This paper considers the solution of the problem: inff[y,x(y)] s.t. y∈nR[y,x(y)]⊆Ek, where x(y) solves: minF(x,y) s.t. x∈R(x,y)⊆En. In order to obtain local solutions, a first-order algorithm, which uses ∈dx(y)/dy∈ for solving a special case of the implicitly defined y-problem, is given. The derivative is obtained from ∈dx(y,r)/dy∈, where r is a penalty function parameter and ∈x(y,r)∈ are approximations to the solution of the x-problem given by a sequential minimization algorithm. Conditions are stated under which x(y,r) and ∈dx(y,r)/dy∈ exist. The computation of ∈dx(y,r)/dy∈ requires the availability of ∈yF(x,y) and the partial derivatives of the other functions defining the set R(x,y) with respect to the parameters y.