*885Opinion
HOLLENHORST, J.This is a juvenile dependency proceeding in which the minor, Matthew F., was declared a dependent child of the court on July 27, 2004. (Welf. & Inst. Code,1 § 300 et seq.) During the proceedings, the court issued a temporary restraining order, followed by a three-year restraining order, against the minor’s father, Leroy F. (hereafter father). The restraining orders were issued pursuant to section 340.5.2 The father appeals, contending that the trial court lacked jurisdiction to issue the three-year restraining order.
FACTS
On December 14, 2004, the social worker assigned to the case filed a declaration in support of her request for a temporary restraining order against father. In her declaration, the social worker cited a number of instances in which father threatened her with physical violence. She stated, “His behavior makes me afraid for my safety.” She felt there was a potential for violence if father’s parental rights were terminated in accordance with the current recommendation. The declaration concludes: “As an effort to protect against workplace violence, [Department of Children’s Services] is currently considering transferring this case to another Social Worker. However, as I have been working on this case and prepared certain reports, I will need to remain involved for this matter which is currently set for trial on 12/17/04 (Contested J/D). In order to protect my safety and well-being I am asking that this court restrain Mr. [F.] from threatening or attacking me.” A summary of father’s lengthy arrest record was attached to the declaration.
The request was heard on December 14, 2004. After hearing argument, the trial court issued a temporary restraining order to protect the social worker.
A contested jurisdictional hearing was heard on December 17, 2004. The social worker testified. At one point, she answered a question by saying, “You know, I’m so frightened I would hate to rely on my memory. I’m shaking. I have to look at my notes.” By that time, the social worker had been taken off the case. The court found the allegations of the section 387 petition to be true and placed the minor in a foster home.
*886On January 3, 2005, a hearing was held on the social worker’s request that the temporary restraining order be made permanent. Father’s counsel called the social worker to testify but stated, “We’ll stipulate that the social worker has been actively involved with the [E] matter.”3 After hearing testimony from the social worker and considering other documentation, the trial court found that father had threatened the social worker, and it signed a three-year restraining order which expires January 3, 2008.
DISCUSSION
As noted ante, father’s sole contention on appeal is that the trial court lacked the jurisdiction to enter a restraining order under section 340.5.
Section 340.5, subdivision (a) provides: “Whenever pursuant to Article 10 (commencing with Section 360) a social worker is assigned to provide child welfare services, family reunification services, or other services to a dependent child of the juvenile court, the juvenile court may, for good cause shown and after an ex parte hearing, issue its order restraining the parents of the dependent child from threatening the social worker, or any member of the social worker’s family, with physical harm.”
The father’s contention is that the court lacked jurisdiction because, at the time the order was issued, the social worker was no longer assigned to provide services to the family. In other words, the father argues that the statute has a temporal component, i.e., a restraining order can only be issued to protect a social worker if, and for so long as, the social worker is assigned to the case.
Father points out that the granting of a restraining order will be upheld on appeal unless the reviewing court finds that the trial court abused its discretion. (Salazar v. Eastin (1995) 9 Cal.4th 836, 850-851 [39 Cal.Rptr.2d 21, 890 P.2d 43] [injunction].) But his argument is lack of jurisdiction, not abuse of discretion.
As respondent points out, this court has held that a deferential standard of review is not appropriate when the trial court misapplies the law. (Riverside County Dept. of Public Social Services v. Superior Court (1999) 71 Cal.App.4th 483, 486 [83 Cal.Rptr.2d 777].) The issue here is a purely legal one: Was the trial court entitled to grant a restraining order requested by a social worker who was no longer assigned to the case?
*887Section 340.5 was enacted in 1991 as Senate Bill No. 704 (1991-1992 Reg. Sess.). The Legislative Counsel’s Digest of Senate Bill No. 704 states: “Under existing law, the juvenile court may order various dispositions with respect to a minor found to be a dependent child of the juvenile court, including a requirement for child welfare services or family reunification services, [f] This bill would specify that, when these or other services are ordered by the juvenile court with respect to a dependent child of the juvenile court and the services are provided by a social worker, the juvenile court may, upon application and for prescribed good cause shown, issue an ex parte restraining order restraining the parents of the dependent child from threatening the social worker, or any member of the social worker’s family, with physical harm.”
Although the parties have not cited any authority on the legislative purpose, we think it is fairly self-evident that the Legislature was seeking to protect social workers who provide services to dependent children. The job can be a stressful one, especially when children must be removed from the custody of their parents. A social worker may routinely encounter angry, hostile, abusive or threatening parents. The statute allows the social worker to request court protection from such threats.
We agree with respondent: “[T]he legislative intent is determined by the ostensible object to be achieved by the section: to enhance the provision of services to dependent children of the juvenile court, by ensuring that those providing the services are not threatened and intimidated from doing so.”
With this purpose in mind, it is clear to us that the Legislature did not intend the social worker’s protection to end when the social worker was taken off the case. Removal of the social worker from the case would be a common way for a supervisor to attempt to defuse social worker/parent confrontations. But it would make little sense to remove the social worker’s protection just when it is needed most. We therefore reject father’s argument that the statute is to be given a temporal meaning, i.e., that protection is only provided to assigned social workers while they remain assigned social workers. A permanent restraining order, lasting three years, may also continue to provide some protection to the social worker for a significant period of time after the dependency proceedings have terminated. Under father’s view, protection would cease at that time.
We view the statutory language as requiring a causal connection, not a temporal one. In other words, the statute requires that a social worker must show good cause for the issuance of a restraining order. Under section 340.5, subdivision (b) good cause is defined to be at least one threat of harm to the social worker.
*888Thus, to be entitled to a restraining order, the department or social worker must show a threat arising from the social worker’s performance of his or her assigned duties in providing services to a dependent child of the juvenile court. As respondent notes, this would include supervisory personnel, including the department’s head, who provide assigned services indirectly to the dependent child. Thus, the head of the department could seek a restraining order against a parent who threatened him or her. Other social workers, such as a social worker who supervises a parent’s visitation with the juvenile in the department’s offices, would also be able to seek a restraining order in an appropriate case. In other words, we view the statute as being applicable to persons other than the single social worker assigned to a case. It applies to all social workers who provide services to dependent wards of the court.
Since there was ample evidence of threats here, and the sufficiency of that evidence is unchallenged, the trial court had jurisdiction to enter a permanent restraining order under section 340.5. It did not abuse its discretion in doing so.
DISPOSITION
The judgment is affirmed.
Ramirez, P. J., and McKinster, J., concurred.
Appellant’s petition for review by the Supreme Court was denied November 16, 2005.
All further statutory references will be to the Welfare and Institutions Code unless otherwise indicated.
While other statutes provide for the issuance of restraining orders in this and similar situations, the parties appear to agree that the only relevant statute is section 340.5. (See also §§ 213.5, 304, 362.4, 726.5; Code Civ. Proc. §§ 527.6 & 527.8.)
Respondent argues, with some persuasiveness, that this stipulation precludes the father from raising on appeal a contention that the order was improper because the social worker was not assigned to the case. However, the reason for the stipulation is not totally clear, and we prefer to reach the merits of the issue.