
408 A.2d 1269 (1979)
STATE of Maine
v.
Charles S. MASON, Jr.
Supreme Judicial Court of Maine.
December 12, 1979.
John R. Atwood, Dist. Atty., Rockland, Robert B. Van Wyck, Asst. Dist. Atty. (orally), Wiscasset, for plaintiff.
Thomas A. Berry, Boothbay Harbor (orally), for defendant.
Before McKUSICK, C. J., and POMEROY, WERNICK, ARCHIBALD, GODFREY and NICHOLS, JJ.
POMEROY, Justice.
Defendant was convicted of burglary, Class C, 17-A M.R.S.A. § 401, after a jury trial in Superior Court. On this appeal defendant asserts that the trial Justice abused his discretion by failing to sanction the State for noncompliance with the automatic discovery rule, Rule 16(a) M.R. *1270 Crim.P., and by denying defendant's motion for judgment of acquittal based upon insufficiency of the evidence. A review of the record reveals that the Justice presiding at defendant's trial did not exercise judicial discretion at all. Because, in the interests of justice, defendant was entitled to have judicial discretion exercised under Rule 16(d), M.R.Crim.P., we sustain his appeal and remand for a new trial.
Defendant's conviction was based upon his role as an accomplice to a burglary allegedly committed by one Gary Ripley.[1] A written statement signed by defendant reveals the following sequence of events: On the evening of August 17, 1978, defendant and Ripley were en route to Bath. Defendant was driving Ripley's automobile. In Camden, at approximately 10:00 p. m., defendant was arrested for operating under the influence of intoxicating liquor and transported to the Knox County Jail in Rockland. He posted bail and was released around 2:15 a. m., August 18, 1978. The bail commissioner transported defendant back to Camden where defendant rejoined Ripley. They then continued towards Bath. Initially Ripley drove, but defendant became the driver again in Warren.
In Newcastle, at Ripley's request, defendant stopped the automobile. Defendant admits he observed Ripley walk to the front door of the Welch Brothers' store with a large object in his hand. He heard a loud crash coming from Ripley's direction, but had lost sight of him. Ripley returned to the automobile within three to five minutes, took the car keys to put something into the trunk, and then placed a number of Marlboro cigarette packs into the glove compartment. Ripley offered defendant some coins which were refused.
Defendant drove to Wiscasset and, around 4:00 a. m., at Ripley's request stopped in front of Huber's Market. Defendant saw Ripley leave the car and heard several loud bangs. Ripley re-entered the car and defendant drove away.
The trial transcript reveals that a police officer observed this activity and, unaware that an attempted break had occurred, followed and stopped Ripley's automobile. After checking the registration and defendant's license, the officer permitted defendant and Ripley to depart. When the officer subsequently discovered a window in the door of Huber's Market had been broken, he radioed in a description of Ripley's car.
For some unexplained reason, defendant proceeded to the Bath Police Department, arriving there around 6:15 a. m.[2] Ripley was lying in the back seat of the automobile, asleep. Defendant was arrested. Around 8:00 a. m., defendant was given Miranda warnings after which he gave an oral statement to the police. The oral statement was, in all essentials, identical to the written statement detailed above except it reveals that:
(a) at some time during the evening of August 17-18, defendant stopped at a church to borrow $30.00 from an undisclosed individual;
(b) at the time of defendant's OUI arrest in Camden, he observed Ripley throw a .357 Magnum gun out of the automobile window;

*1271 (c) in Newcastle, when Ripley placed the Marlboro cigarettes into the glove compartment he stated to defendant, "Here. They're part yours."

Defendant was transported to the Lincoln County Sheriff's Department at 11:30 a. m. At 4:15 p. m., defendant was again read his Miranda rights after which he signed the written statement.
Prior to trial, defendant filed a request for discovery in compliance with Rule 16(b), M.R.Crim.P., which request included, inter alia, all matters which were material to the preparation of the defense or which the State intended to use as evidence in chief at trial. No material was proffered to defendant in response to this request.
Defendant filed a motion to suppress all statements made to police on or about August 18, 1978, claiming they were not knowingly and voluntarily made. In support of this motion, defendant testified at the suppression hearing that he was an alcoholic, that he had been drinking on the night in question, and that he had taken in conjunction with the alcohol a number of Valium tablets. The motion was denied.
A jury trial was subsequently had. The State called as a witness the Bath police detective who was present the morning of August 18 when defendant made his oral statement. When he began to testify as to the substance of that statement, defense counsel objected. In response, the State suggested the witness be examined outside the presence of the jury. After the voir dire examination, defense counsel again objected to the admission of defendant's oral statement. The following colloquy occurred:
MR. BERRY: I have no objection to the substance of it, your Honor. The reference to the gun, I think, is unlawfully prejudicial and with no value. This is the first time it has arisen, and also the statement by Ripley, I consider that a situation where I am not able to call Mr. Ripley to cross-examine him, and I don't think any statements made by Ripley are admissible, and this is the first time I have heard it as well.

THE COURT: You mean the, "Go ahead. They are part yours"?
MR. BERRY: Precisely.
THE COURT: Well with reference to the gun and Mr. Mason's statement concerning the gun, I will deny your objection as to that. It may in fact, and is relevant as to his state of mind in participating in these events, and the Court is unaware of any prejudice which would outweigh that relevance.
With regard to the statement made by Mr. Ripley, I assume the State is offering this not for the truth of the statement attributed to Mr. Ripley but that it was an admission made by the defendant which might bear upon his state of mind during the course.
MR. VAN WYCK: Yes, It would be a state of mind that we would be offering it for.
THE COURT: So I will deny the objection as to that. If there is nothing further, the jury may be brought in.
MR. BERRY: I want to state for the record again that I object to this being in. It was not proffered at the suppression hearing and I object to it.
THE COURT: You may and it is denied.
At the close of evidence the defendant moved for a mistrial based on the State's violation of Rule 16, which motion was denied. On appeal, defendant argues that the trial Justice abused his discretion when he refused to sanction the State by excluding the oral statement from evidence or by granting the motion for a mistrial.
As an initial matter, the State argues that the defendant's objection was not timely raised, and that appellate review may be based only upon a showing of obvious error. In State v. Thibodeau, Me., 353 A.2d 595, 605 (1976), we explained that an objection to evidence at trial must be sufficiently definite to notify the court of the grounds for objection. A review of the record reveals that the error was preserved. An objection was made prior to the admission of the oral statement into evidence. Although the automatic discovery rule, *1272 Rule 16(a), was not specifically cited until the motion for a mistrial was made, the presiding Justice was informed that the defense had not been furnished the substance of the oral statement before trial. The Justice had ample opportunity to exclude the statement or to take other appropriate action, if, in his discretion, he so chose. Cf. State v. Thompson, Me., 370 A.2d 650 (1977).
As the first claim of error, defendant argues that the trial Justice abused his discretion by not sanctioning the State for its failure to comply with Rule 16(a), M.R. Crim.P.[3] Rule 16(d), M.R.Crim.P. provides sanctions for non-compliance with the rule of discovery by defendants:

If the attorney for the State fails to comply with this rule, the court on motion of the defendant or on its own motion may take appropriate action, which may include, but is not limited to, one or more of the following: requiring the attorney for the State to comply, granting the defendant additional time or a continuance, relieving the defendant from making a disclosure required by Rule 16A, prohibiting the attorney for the State from introducing specified evidence and dismissing charges with prejudice.[4]
On review, when a ruling rests upon the exercise of judicial discretion, that ruling may not be set aside absent a showing of an abuse of discretion or an error of law. Higgins v. Higgins, Me., 370 A.2d 670 (1977). The primary test of the appropriateness of an exercise of judicial discretion is whether in a given case the ruling is in the furtherance of justice. In re Wagner's Petition, 155 Me. 257, 153 A.2d 619 (1959). Where, however, the presiding Justice does not exercise judicial discretion when he is authorized to do so, his ruling is based upon a misconception of the applicable law. Fitch v. Whaples, Me., 220 A.2d 170 (1966).
"Discretion means legal discretion in the exercise of which the court must take account of the law applicable to the particular circumstances of the case and be governed accordingly. Implicit is conscientious judgment directed by law and reason and looking to a just result. . . Consequently, if the trial judge misconceives the applicable law, or misapplies it to the factual complex, in total effect the exercise of the legal discretion lacks a foundation and becomes an arbitrary act, however conscientious may have been the judge in the performance of it." [Emphasis supplied.] Wasserstein v. Swern & Co., 84 N.J.Super. 1, 200 A.2d 783, 786 (1964); Kavanaugh v. Quigley, 63 N.J.Super. 153, 164 A.2d 179, 182. Id. at 174.
In the instant case, it appears from the record and from the ruling made that the trial Justice did not exercise judicial discretion. His ruling on the admissibility *1273 of defendant's oral statement was based solely on its admissibility under the applicable rules of evidence. He did not purport to evaluate whether defendant was prejudiced by the State's failure to provide the defendant, within a reasonable time, the substance of his oral statement.
The trial Justice did weigh the potential prejudice of the evidence concerning the gun against its probative value, as authorized by Rule 403, M.R.Evid. The inquiry concerned the impermissible effect such information might have upon a jury. The Justice did not in any way evaluate whether defendant was prejudiced by the State's failure to timely provide him the substance of the oral statement.
Rule 16(a) was intended to enhance a defendant's opportunity to prepare for trial, and to diminish the element of unfair surprise. In State v. Bishop, supra, we strongly emphasized the necessity for prosecutors "to set up and maintain a system for routine and timely disclosure to defense counsel." The underlying purpose for requiring disclosures is to "mak[e] the result of criminal trials depend upon the merits of the case rather than on the demerits of lawyer performance on one side or the other." Id. at 26.
It is clear from the record that defense counsel was unfairly surprised by the introduction into evidence of defendant's oral statement. He told the presiding Justice:
I don't know what he is going to say now and I would like to hear it before hearing it in front of the jury . . . I am just a little nervous that I am hearing things now for the first time.
Defendant had the right, when confronted at trial for the first time with evidence that the State was duty-bound to disclose before trial, to have the trial Justice exercise his discretion under Rule 16(d). The Court was obligated to consider whether, in the furtherance of justice, an appropriate sanction should be imposed. This he did not do. For this reason we sustain defendant's appeal.
The entry must be:
Appeal sustained.
Judgment vacated.
Remanded for further proceedings consistent with this opinion.
GLASSMAN, J., did not sit.
NOTES
[1]  17-A M.R.S.A., section 57 provides in part:

1. A person may be guilty of a crime if it is committed by the conduct of another person for which he is legally accountable as provided in this section.
2. A person is legally accountable for the conduct of another person when:
. . . . .
C. He is an accomplice of such other person in the commission of the crime, as provided in subsection 3.
3. A person is an accomplice of another person in the commission of a crime if:
A. With the intent of promoting or facilitating the commission of the crime, he solicits such other person to commit the crime, or aids or agrees to aid or attempts to aid such other person in planning or committing the crime. A person is an accomplice under this subsection to any crime the commission of which was a reasonably foreseeable consequence of his conduct; . . .
[2]  Defendant testified at the suppression hearing that he thought he went to see his foster sister, who was an employee of the Bath Police Department. At trial, a police officer testified that defendant went to Bath to convey some information concerning a drug transaction to the Bath Police.
[3]  Rule 16(a), M.R.Crim.P. provides as follows:

(a) Automatic Discovery.
(1) Duty of the Attorney for the State. The attorney for the State shall furnish to the defendant within a reasonable time:
(A) A statement describing any testimony or other evidence intended to be used against the defendant which:
(i) Was obtained as a result of a search and seizure or the hearing or recording of a wire or oral communication;
(ii) Resulted from any confession, admission, or statement made by the defendant; or
(iii) Relates to a lineup, showup, picture, or voice identification of the defendant;
(B) Any written or recorded statements and the substance of any oral statements made by the defendant.
(C) A statement describing any matter or information known to the attorney for the State which may not be known to the defendant and which tends to create a reasonable doubt of the defendant's guilt as to the offense charged.
(2) Continuing Duty to Disclose. The attorney for the State shall have a continuing duty to disclose the matters specified in this subdivision.
[4]  In State v. Bishop, Me., 392 A.2d 20 (1978), we interpreted for the first time the language of Rule 16(d), M.R.Crim.P., and held that the imposition of one of the sanctions listed, or of any sanction, was within the discretion of the presiding Justice:

By the express terms of Rule 16(d), the presiding justice "may" take "appropriate" action to remedy a violation of Rule 16(a). The imposition of a sanction is not mandatory. The "appropriate" sanction may be nothing at all. Id. at 26.
